Submission #365944

#TimeUsernameProblemLanguageResultExecution timeMemory
365944Ahmad_HasanFootball (info1cup20_football)C++17
34 / 100
304 ms2028 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { int t; cin>>t; while(t--){ int n,k; cin>>n>>k; vector<int>v(n); int cnt1=0, cnt2=0, cnt4=0; for(int i=0;i<n;i++){ cin>>v[i]; cnt1+=v[i]/1; cnt2+=v[i]/2; cnt4+=v[i]/4; } int f=0; if((cnt1)%2)f=1; else if(k>=2&&(cnt2)%2)f=1; else if(k>=2&&(cnt4)%2)f=1; if(f) 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...