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 <bits/stdc++.h>
#include "circuit.h"
using namespace std;
typedef long long ll;
int n, m;
vector<int> p, a, mark;
void init(int N, int M, vector<int> P, vector<int> A) {
n = N, m = M; p = P; a = A;
}
int count_ways(int L, int R) {
L -= n; R -= n;
for (int i = L; i <= R; i++) {
a[i] = !a[i];
}
ll res = 0;
for (auto &e : a) res += e;
return res;
}
#ifdef TEST
#include "grader.cpp"
#endif
# | 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... |