제출 #417933

#제출 시각아이디문제언어결과실행 시간메모리
417933victoriadFootball (info1cup20_football)C++14
100 / 100
48 ms2016 KiB
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <utility> #include <queue> #include <map> #include <iomanip> #include <stack> #include <fstream> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int n,k,t; long long int s; cin>>t; while(t--){ cin>>n>>k; vector<long long int>c(n); int x=0; for(int i=0;i<n;i++){ cin>>c[i]; if(c[i]%2==1){ x++; } } if(x%2==1){ cout<<1; } else { s=0; while(k!=1 && s%2==0){ for(int i=0;i<n;i++){ c[i]/=2; s+=c[i]; } k/=2; } if(s%2==1)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...