Submission #797567

#TimeUsernameProblemLanguageResultExecution timeMemory
797567jakobrsDigital Circuit (IOI22_circuit)C++17
0 / 100
2045 ms1444 KiB
#include <iostream> #include <vector> using i64 = int64_t; int n, m; std::vector<int> p, a; void init(int N, int M, std::vector<int> P, std::vector<int> A) { n = N; m = M; p = P; a = A; } int count_ways(int l, int r) { r += 1; int c = 0; for (i64 i = 0; i < m; i++) { if (l <= i && i < r) { a[i] = !a[i]; } c += a[i]; } return c; }
#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...