Submission #679942

#TimeUsernameProblemLanguageResultExecution timeMemory
679942L0RD3NFootball (info1cup20_football)C++14
100 / 100
217 ms1976 KiB
#include "iostream" using namespace std; int t, n, k, v[100005] ; void solve() { long long sum = 0 ; string winner = "T" ; cin >> n >> k ; for (int i = 1 ; i <= n ; i ++) cin >> v[i] ; while (k && winner == "T") { sum = 0 ; for (int i = 1 ; i <= n ; i ++) sum += v[i] ; if (sum % 2 == 1) winner = "S" ; for (int i = 1 ; i <= n ; i ++) v[i] /= 2 ; k /= 2 ; } if (winner == "S") cout << 1 ; else cout << 0 ; } int main () { cin >> t ; for (int tt = 1 ; tt <= t ; tt ++) 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...