Submission #1005039

#TimeUsernameProblemLanguageResultExecution timeMemory
1005039vjudge1이상한 기계 (APIO19_strange_device)C++17
10 / 100
5078 ms524288 KiB
#include<bits/stdc++.h> using namespace std; int main() { long long n, A, B; cin >> n >> A >> B; set<pair<long long,long long> > st; for(int i = 0; i < n; i ++) { long long l, r; cin >> l >> r; for(long long 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...