#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+m;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 |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Correct |
1 ms |
4952 KB |
Output is correct |
3 |
Incorrect |
1 ms |
4952 KB |
4th lines differ - on the 1st token, expected: '500', found: '504' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Incorrect |
1 ms |
4952 KB |
1st lines differ - on the 1st token, expected: '52130940', found: '0' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Correct |
1 ms |
4952 KB |
Output is correct |
3 |
Incorrect |
1 ms |
4952 KB |
4th lines differ - on the 1st token, expected: '500', found: '504' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
354 ms |
7064 KB |
1st lines differ - on the 1st token, expected: '431985922', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
354 ms |
7064 KB |
1st lines differ - on the 1st token, expected: '431985922', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Incorrect |
1 ms |
4952 KB |
1st lines differ - on the 1st token, expected: '52130940', found: '0' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Correct |
1 ms |
4952 KB |
Output is correct |
3 |
Incorrect |
1 ms |
4952 KB |
4th lines differ - on the 1st token, expected: '500', found: '504' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4952 KB |
Output is correct |
2 |
Correct |
1 ms |
4952 KB |
Output is correct |
3 |
Incorrect |
1 ms |
4952 KB |
4th lines differ - on the 1st token, expected: '500', found: '504' |
4 |
Halted |
0 ms |
0 KB |
- |