제출 #845227

#제출 시각아이디문제언어결과실행 시간메모리
845227jamkel19Football (info1cup20_football)C++14
0 / 100
29 ms604 KiB
#include <bits/stdc++.h> using namespace std; #define st first #define nd second typedef long long ll; int main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int q; cin>>q; string wynik=""; while(q--) { int n,k; cin>>n>>k; vector<int>a(n); for(int i=0;i<n;i++) { cin>>a[i]; } int x=1; bool p=false; for(int i=0;i<20 && x<k;i++) { ll w=0; for(int j=0;j<n;j++) { w+=a[j]/x; } if(w%2==1) { p=true; break; } x*=2; } if(p) { wynik+='1'; } else { wynik+='0'; } } cout<<wynik<<endl; }
#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...