제출 #757941

#제출 시각아이디문제언어결과실행 시간메모리
757941AlkaratFootball (info1cup20_football)C++14
100 / 100
41 ms2032 KiB
#include<bits/stdc++.h> #define ll long long #define ld long double #define pll pair<ll,ll> #define mp make_pair #define pb push_back #define fi first #define se second using namespace std; #define LOCALIO "C:/Users/admin/Documents/Code/" ll n, k, a[100005]; bool Try(ll num) { ll ans=0; for (ll i=1; i<=n; i++) ans+=a[i]/num; return ans%2; } int main() { #ifdef LOCAL freopen( LOCALIO "input.txt","r",stdin) ; freopen( LOCALIO "output.txt","w",stdout) ; #endif ios_base::sync_with_stdio(NULL); cin.tie(nullptr); cout.tie(nullptr); ll t; cin >> t; while (t--) { cin >> n >> k; for (ll i=1; i<=n; i++) cin >> a[i]; ll bit=1; while (bit<=k) { if (Try(bit)) { cout << 1; break; } bit<<=1; } if (bit>k) cout << 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...