제출 #369182

#제출 시각아이디문제언어결과실행 시간메모리
369182dooweyFootball (info1cup20_football)C++17
100 / 100
57 ms2156 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); int main(){ fastIO; int tc; cin >> tc; for(int ti = 1; ti <= tc; ti ++ ){ int n; ll k; cin >> n >> k; vector<ll> x(n); for(int i = 0 ;i < n; i ++ ){ cin >> x[i]; } ll cc; bool who = false; ll cum; for(int lg = 0; lg < 32; lg ++ ){ cc = (1 << lg); if(cc <= k){ cum = 0; for(int i = 0 ; i < n; i ++) { cum += x[i] / cc; } if(cum % 2 == 1){ who = true; break; } } } if(who){ cout << "1"; } else{ cout << "0"; } } 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...