Submission #675362

#TimeUsernameProblemLanguageResultExecution timeMemory
675362jahsdwaijsdFootball (info1cup20_football)C++17
100 / 100
32 ms492 KiB
/* #pragma GCC optimize("Ofast") #pragma GCC target("avx2") #pragma GCC optimize("unroll-loops") */ #include <bits/stdc++.h> #define taskname "bai3" #define int long long #define all(x) x.begin(), x.end() #define ll long long #define ld long double #define pb push_back #define ff first #define ss second #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> using namespace std; const int mxN = 2e5 + 5; const int base = 1e9 + 1; const int mod = 1e9 + 7; const ll oo = 1e18; int n, k, a[mxN]; void solve() { cin >> n >> k; for(int i = 1; i <= n; ++i) { cin >> a[i]; } int lmao = 1; while(lmao <= k) { ll sum = 0; for(int i = 1; i <= n; ++i) { sum += (a[i] / lmao); } if(sum % 2 == 1) { cout << 1; return; } lmao <<= 1; } cout << 0; } signed main() { #ifdef CDuongg freopen("bai3.inp", "r", stdin); freopen("bai3.out", "w", stdout); auto start = chrono::high_resolution_clock::now(); #endif ios_base::sync_with_stdio(false); cin.tie(nullptr); int t = 1; cin >> t; while(t--) solve(); cout << endl; #ifdef CDuongg auto end = chrono::high_resolution_clock::now(); cout << "\n"; for(int i = 1; i <= 100; ++i) cout << '='; cout << "\nExecution time: " << chrono::duration_cast<chrono::milliseconds> (end - start).count() << "[ms]" << endl; #endif }
#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...