Submission #850601

#TimeUsernameProblemLanguageResultExecution timeMemory
850601stefanneaguFootball (info1cup20_football)C++17
26 / 100
2037 ms1984 KiB
#include <iostream> #include <map> #include <vector> using namespace std; int v[100005]; void testcase() { int n, k; cin >> n >> k; if(n == 1) { 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...