제출 #1027582

#제출 시각아이디문제언어결과실행 시간메모리
1027582vjudge1Football (info1cup20_football)C++17
50 / 100
19 ms852 KiB
#include<bits/stdc++.h> using namespace std; #define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long #define int long long int //#define endl '\n' #define N 2100 #define M 32 #define big 2147483647 #define bigg 9223372036854775807 #define pb push_back #define p push #define ins insert #define f first #define s second signed main(){ lalala; int test;cin>>test; while(test--){ int n,k;cin>>n>>k; int top=0; vector<int> v; for(int i=0;i<n;i++){ int x;cin>>x; v.pb(x); top+=x; } //cout<<top<<endl; if(k==1){ if(top%2==0)cout<<0; else cout<<1; } else{ int ok=0; for(auto u:v){ for(int i=0;i<M;i++){ int x=((ll)1<<i); if(x>u||x>k)break; if(u%x==0){ if((u/x)%2){ ok++; break; } } } } ok=(ok%2); cout<<ok; } } cout<<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...