Submission #720399

#TimeUsernameProblemLanguageResultExecution timeMemory
720399nasir_bashirovDigital Circuit (IOI22_circuit)C++17
2 / 100
2336 ms1428 KiB
#include "circuit.h" #include <vector> int n, m; std::vector<int> p, a; void init(int N, int M, std::vector<int> P, std::vector<int> A) { p = P, a = A; n = N, m = M; } int count_ways(int L, int R) { int cnt = 0; L--, R--; for(int i = 0; i < m; i++){ if(i >= L and i <= R){ a[i] = 1 - a[i]; } cnt += a[i]; } return cnt; }
#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...