Submission #675357

#TimeUsernameProblemLanguageResultExecution timeMemory
675357Tuanlinh123Football (info1cup20_football)C++17
100 / 100
41 ms492 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); // freopen("FIBONACCI.inp","r",stdin); // freopen("FIBONACCI.out","w",stdout); 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...