# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1074068 | fv3 | Rarest Insects (IOI22_insects) | C++17 | 0 ms | 0 KiB |
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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> A;
int N;
void init(int N_, int M, vector<int> P, vector<int> A_)
{
N = N_;
A = A_;
}
int count_ways(int L, int R)
{
L -= N;
R -= N;
int sum = 0;
for (int i = L; i <= R; i++)
{
A[i] ^= 1;
sum += A[i];
}
return sum;
}
#include "grader.cpp"