제출 #365948

#제출 시각아이디문제언어결과실행 시간메모리
365948Ahmad_HasanFootball (info1cup20_football)C++17
61 / 100
330 ms1484 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>=4&&(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...