제출 #850607

#제출 시각아이디문제언어결과실행 시간메모리
850607stefanneaguFootball (info1cup20_football)C++17
100 / 100
170 ms2200 KiB
#include <iostream> #include <map> #include <vector> using namespace std; int v[100005]; void testcase() { int n, k; cin >> n >> k; for(int i = 1; i <= n; i ++) { cin >> v[i]; } bool ok = 0; while(k >= 1) { int sum = 0; for(int i = 1; i <= n; i ++) { sum += v[i]; } if(sum %= 2) { ok = 1; } k /= 2; for(int i = 1; i <= n; i ++) { v[i] /= 2; } } cout << ok; } int main() { int tests; cin >> tests; for(int i = 1; i <= tests; i ++) { testcase(); } 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...