上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 时间复杂度 N*M≈2.5e6 #include <bits/stdc++.h> using namespace std; int n = 510, m; const int N = 510; vector<pair<int,int>> path; // 储存所有边 int p[N]; // 储存祖 阅读全文
posted @ 2024-08-29 22:02 Frodnx 阅读(11) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N = 1000; int p[N]; int find(int x) { if(p[x] != x) p[x] = find(p[x]); return p[x]; } int main 阅读全文
posted @ 2024-08-29 19:45 Frodnx 阅读(10) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int arr[10][10]; int main() { int n; cin >> n; for(int t = 1; t <= n; ++ t) { for(int j = 1; j <= 9; ++ 阅读全文
posted @ 2024-08-27 18:20 Frodnx 阅读(119) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; #define int long long int func(int n) { int res = 0; while(n >= 10) { int a = n; vector<int> num; while( 阅读全文
posted @ 2024-08-27 17:55 Frodnx 阅读(163) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N = 110; double price[N]; int total[N]; int main() { int n; cin >> n; for(int i = 1; i <= n; + 阅读全文
posted @ 2024-08-27 17:41 Frodnx 阅读(156) 评论(0) 推荐(0)
摘要: 思路可能不太对,但是确实是过了 #include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int sum = 0; int minm = 999999; for(int i = 1; i < 阅读全文
posted @ 2024-08-27 17:26 Frodnx 阅读(115) 评论(0) 推荐(0)
摘要: 不会写可以switch把所有情况全写出来,总共只有六种不多 // 4'05" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if(b == 1 || b == 0 && a == 2) c 阅读全文
posted @ 2024-08-24 01:47 Frodnx 阅读(155) 评论(0) 推荐(0)
摘要: // 1'02" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << b - a; return 0; } 阅读全文
posted @ 2024-08-24 01:41 Frodnx 阅读(29) 评论(0) 推荐(0)
摘要: print("Problem? The Solution: Programming.") 阅读全文
posted @ 2024-08-24 01:39 Frodnx 阅读(32) 评论(0) 推荐(0)
摘要: ez // 5'46" #include <bits/stdc++.h> using namespace std; bool func(int a, int b) { int sum = 0; while(a) { sum += a % 10; a /= 10; } return b % sum; 阅读全文
posted @ 2024-08-24 01:37 Frodnx 阅读(33) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 13 下一页