1 条题解
-
0
错误代码:
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 5; int n, K, s, a, sg[maxn], cnt[maxn]; vector<int> g[maxn]; void init() { for (int i = 1; i < maxn; i++) { for (int j = 1; i * j < maxn; j++) { if (cnt[i * j] < K) { cnt[i * j]++; g[i * j].push_back(i * j - i); } } int mex[100] = {}; for (auto j : g[i]) mex[sg[i - j]] = 1; while (mex[sg[i]]) sg[i]++; } } int main() { scanf("%d%d", &n, &K); for (int i = 0; i < n; i++) { scanf("%d", &a); s ^= a; } puts(s ? "Alice" : "Bob"); return 0; }
- 1
信息
- ID
- 44
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- 递交数
- 13
- 已通过
- 1
- 上传者