Submission #1005666

#TimeUsernameProblemLanguageResultExecution timeMemory
1005666vicvicFootball (info1cup20_football)C++11
57 / 100
17 ms456 KiB
#include <iostream> using namespace std; int t; void solve () { long long int n, k; cin >> n >> k; long long xorul=0; for (int i=1;i<=n;i++) { long long r; cin >> r; if (r/k%2==1) { xorul^=k; } xorul^=(r%k); } 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...