Submission #1005038

#TimeUsernameProblemLanguageResultExecution timeMemory
1005038vjudge1Strange Device (APIO19_strange_device)C++17
0 / 100
2137 ms524288 KiB
#include<bits/stdc++.h> using namespace std; int main() { int n, A, B; cin >> n >> A >> B; set<pair<int,int> > st; for(int i = 0; i < n; i ++) { int l, r; cin >> l >> r; for(int j = l; j <= r; j ++) st.insert({(j + (j / B)) % A, j % B}); } cout << st.size() << endl; 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...