제출 #397060

#제출 시각아이디문제언어결과실행 시간메모리
397060fedoseevtimofeyFootball (info1cup20_football)C++14
42 / 100
2079 ms1372 KiB
#include <iostream> #include <string> #include <vector> #include <queue> #include <deque> #include <stack> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <random> #include <iomanip> #include <functional> #include <cassert> #include <bitset> #include <chrono> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); #ifdef LOCAL freopen("input.txt", "r", stdin); #endif int t; cin >> t; while (t--) { int n, k; cin >> n >> k; vector <int> a(n); for (int i = 0; i < n; ++i) cin >> a[i]; int ok = 0; for (int x = 1; x <= k; ++x) { int cnt = 0; for (int i = 0; i < n; ++i) cnt += (a[i] / x) % 2; ok |= cnt % 2; } cout << ok; } }
#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...