제출 #784309

#제출 시각아이디문제언어결과실행 시간메모리
784309TrunktyFootball (info1cup20_football)C++14
100 / 100
33 ms2064 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll int t; int arr[100005]; signed main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin >> t; for(int e=1;e<=t;e++){ int n,k; cin >> n >> k; for(int i=1;i<=n;i++){ cin >> arr[i]; } bool yes = false; for(int j=0;j<=60;j++){ if((1LL<<j)>k){ break; } int tot=0; for(int i=1;i<=n;i++){ tot += arr[i]/(1LL<<j); } if(tot%2LL){ yes = true; break; } } if(yes){ cout << 1; } else{ cout << 0; } } cout << "\n"; 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...