Submission #947672

#TimeUsernameProblemLanguageResultExecution timeMemory
947672fasdfhasjfaksdfjhalskdjhfFootball (info1cup20_football)C++14
0 / 100
178 ms856 KiB
#include <bits/stdc++.h> #include <functional> #include <queue> using namespace std; int main() { int T; cin >> T; while(T--){ int N, K; cin >> N >> K; priority_queue<int> pq; for(int i = 0; i < N; i++){ int x; cin >> x; pq.push(x); } bool turn = 0; while(!pq.empty()){ int t = pq.top(); pq.pop(); turn = turn ^ 1; if(t <= K){ K = t; } else{ int r = t % K; if((t / K) % 2 == 0) turn = 0; else turn = 1; pq.push(r); } } cout << turn; } }
#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...