제출 #850603

#제출 시각아이디문제언어결과실행 시간메모리
850603stefanneaguFootball (info1cup20_football)C++17
26 / 100
162 ms456 KiB
#include <iostream> #include <map> #include <vector> using namespace std; int v[100005]; void testcase() { int n, k; cin >> n >> k; if(n == 1) { cin >> n; if(n % 2 == 1 || k >= n || (k > 1 && n % 4 == 0)) { cout << 1; } else { cout << 0; } return; } int x = 0; for(int i = 1; i <= n; i ++) { int a; cin >> a; x += a; if(x > 1e9) { x %= 2; } } cout << x % 2; } 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...