Submission #938975

#TimeUsernameProblemLanguageResultExecution timeMemory
938975irmuunDigital Circuit (IOI22_circuit)C++17
0 / 100
371 ms6504 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...