제출 #845273

#제출 시각아이디문제언어결과실행 시간메모리
845273jamkel19Football (info1cup20_football)C++14
100 / 100
28 ms1624 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); ll q; cin>>q; string wynik=""; while(q--) { ll n,k; cin>>n>>k; vector<ll>a(n); for(ll i=0;i<n;i++) { cin>>a[i]; } ll x=1; bool p=false; for(ll i=0;i<40 && x<=k;i++) { ll w=0; for(ll 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...