제출 #1005038

#제출 시각아이디문제언어결과실행 시간메모리
1005038vjudge1이상한 기계 (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...