Submission #124363

#TimeUsernameProblemLanguageResultExecution timeMemory
124363RafikHachanaStrange Device (APIO19_strange_device)C++14
0 / 100
5003 ms376 KiB
#include<bits/stdc++.h> using namespace std; set<pair<int,int> > s; int main() { int a,b,n; cin>>a>>b>>n; while(n--) { int l,r; cin>>l>>r; for(int i=l;i<=r;i++) { s.insert({(i+i/b)%a,i%b}); } } cout<<s.size()<<endl; }
#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...