Submission #685601

#TimeUsernameProblemLanguageResultExecution timeMemory
685601heeheeheehaawFootball (info1cup20_football)C++17
100 / 100
215 ms2036 KiB
#include <iostream> #define int long long using namespace std; int n, k, t, sum = 0; int v[100005]; void solve() { cin>>n>>k; sum = 0; for(int i = 1; i <= n; i++) { cin>>v[i]; sum += v[i]; } while(k != 1 && sum % 2 != 1) { k /= 2; sum = 0; for(int i = 1; i <= n; i++) { if(v[i] != 0) v[i] /= 2; sum += v[i]; } } if(sum % 2 == 0) cout<<0; else cout<<1; return; } signed main() { 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...