Submission #910775

#TimeUsernameProblemLanguageResultExecution timeMemory
910775tnunDigital Circuit (IOI22_circuit)C++17
2 / 100
1721 ms1624 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back int n,m,p[100060],a[100060]; void init(int N,int M, vector<int> P,vector<int> A){ n=N; m=M; for(int i=0;i<N+M;i++){ p[i]=P[i]; } for(int i=0;i<M;i++){ a[i]=A[i]; } } int count_ways(int l,int r){ for(int i=l-1;i<r;i++){ a[i]=(a[i]+1)%2; } int cnt=0; for(int i=0;i<m;i++){ if(a[i]==1){ cnt++; } } return cnt; }
#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...