Submission #418233

#TimeUsernameProblemLanguageResultExecution timeMemory
418233dolphingarlicFootball (info1cup20_football)C++14
8 / 100
34 ms1012 KiB
#include <bits/stdc++.h> typedef long long ll; using namespace std; int dp[101][101]; int main() { cin.tie(0)->sync_with_stdio(0); for (int k = 1; k <= 100; k++) { for (int i = 0; i <= 100; i++) { unordered_set<int> mex; for (int j = 1; j <= min(i, k); j++) mex.insert(dp[j][i - j]); for (int j = 0; ; j++) if (!mex.count(j)) { dp[k][i] = j; break; } } } int t; cin >> t; while (t--) { int n, k; cin >> n >> k; ll nimber = 0; for (int i = 1; i <= n; i++) { ll sz; cin >> sz; nimber ^= dp[k][sz]; } cout << (nimber != 0); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...