Submission #652750

#TimeUsernameProblemLanguageResultExecution timeMemory
652750BlagojDigital Circuit (IOI22_circuit)C++17
2 / 100
1828 ms1176 KiB
#include "circuit.h" #include <bits/stdc++.h> using namespace std; vector<int> states; int n, m; void init(int N, int M, std::vector<int> P, std::vector<int> A) { states = A; n = N; m = M; } int count_ways(int L, int R) { for (int i = L - n; i <= R - n; i++) { if (states[i] == 1) { states[i] = 0; } else { states[i] = 1; } } int ans = 0; for (int i = 0; i < m; i++) { ans += states[i]; } return ans; }
#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...