Submission #1064329

#TimeUsernameProblemLanguageResultExecution timeMemory
1064329MarwenElarbiDigital Circuit (IOI22_circuit)C++17
2 / 100
7 ms2136 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #define fi first #define se second const int nax=2e3+5; const int MOD=1e9+2022; int tab[nax]; int n; int m; void init(int N, int M, std::vector<int> P, std::vector<int> A){ n=N;m=M; for (int i = 0; i < M; ++i) { tab[i]=A[i]; } return; } int count_ways(int L, int R) { int ans=0; for (int i = 0; i < m; ++i) { if(L-n<=i&&i<=R-n) tab[i]^=1; ans+=tab[i]; } return ans; }
#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...