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;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
const int mod=1000002022;
const int maxn=2e5;
vector<int>adj[maxn];
vector<int>a;
int n,m;
void init(int N,int M,vector<int>p,vector<int>A){
n=N;
m=M;
a=A;
for(int i=1;i<n;i++){
adj[p[i]].pb(i);
}
}
int count_ways(int l,int r){
if(n==1){
int cnt=0;
for(int i=1;i<n+m;i++){
if(l<=i&&i<=r){
a[i]=1-a[i];
}
cnt+=a[i];
}
return cnt;
}
return 0;
}
# | 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... |