This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |