Submission #124369

#TimeUsernameProblemLanguageResultExecution timeMemory
124369RafikHachanaStrange Device (APIO19_strange_device)C++14
10 / 100
5066 ms524292 KiB
#include<bits/stdc++.h> using namespace std; #define int long long set<pair<int,int> > s; main() { int a,b,n; cin>>n>>a>>b; 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; }

Compilation message (stderr)

strange_device.cpp:8:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main()
      ^
#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...