제출 #865040

#제출 시각아이디문제언어결과실행 시간메모리
865040Darren0724Football (info1cup20_football)C++17
50 / 100
24 ms1508 KiB
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define int long long #define ACorz ios_base::sync_with_stdio(false);cin.tie(0); void solve(){ int n,k;cin>>n>>k; vector<int> v(n); int total=0,total2=0; for(int i=0;i<n;i++){ cin>>v[i]; total+=v[i]; total2+=v[i]/2; } if(k==1){ cout<<(total&1); return; } cout<<((total&1)|(total2&1)); } int32_t main(){ ACorz; int t=1;cin>>t; while(t--){ solve(); } 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...