摘要:
1. 朴素做法(会超时) 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N][N]; int main() { cin >> n >> m; for 阅读全文
摘要:
1. 朴素做法(二维数组) 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N][N]; int main() { cin >> n >> m; fo 阅读全文
摘要:
点击查看代码 #include<iostream> #include<cstring> #include<unordered_set> using namespace std; const int N = 110; int n; int f[N]; int sg(int x) { if (f[x] 阅读全文
摘要:
点击查看代码 #include<iostream> #include<cstring> #include<unordered_set> using namespace std; const int N = 110, M = 1e4 + 10; int k, n; int s[N], f[M]; // 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; int main() { int n; cin >> n; int res = 0; for (int i = 1; i <= n; i ++) { int x; scanf("%d", &x); if ( 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; int main() { int n; cin >> n; int res = 0; while (n --) { int x; scanf("%d", &x); res ^= x; } if (res) 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; typedef long long LL; const int N = 20; int n, m; int p[N]; int main() { cin >> n >> m; for (int i = 0; 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; typedef long long LL; const int mod = 1e9 + 7; int qmi(int a, int k) { int res = 1; while (k) { if (k & 阅读全文