Submission #1005664

#TimeUsernameProblemLanguageResultExecution timeMemory
1005664vicvicFootball (info1cup20_football)C++11
8 / 100
2101 ms860 KiB
#include <iostream> using namespace std; int t; void solve () { int n, k, v[100005]; cin >> n >> k; long long xorul=0; for (int i=1;i<=n;i++) { cin >> v[i]; while (v[i]>=k) { xorul^=k; v[i]-=k; } xorul^=v[i]; } if (xorul==0) { cout << 0; return; } cout << 1; return; } int main() { ios :: sync_with_stdio (0); cin.tie (nullptr); cin >> t; while (t--) { solve (); } 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...