제출 #568784

#제출 시각아이디문제언어결과실행 시간메모리
568784birthdaycake이상한 기계 (APIO19_strange_device)C++17
10 / 100
5039 ms524288 KiB
#include<bits/stdc++.h> #define int long long #define endl '\n' #define mod 1000000007 #define boost ios_base::sync_with_stdio(false), cin.tie(NULL); using namespace std; pair<int,int>a[2000001]; signed main() { int n,A,B, ans = 0; cin >> n >> A >> B; set<pair<int,int>>x; for(int i = 0; i < n; i++){ cin >> a[i].first >> a[i].second; for(int j = a[i].first; j <= a[i].second; j++){ x.insert({(j + (j / B) ) % A, j % B}); } } cout << x.size(); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

strange_device.cpp: In function 'int main()':
strange_device.cpp:12:16: warning: unused variable 'ans' [-Wunused-variable]
   12 |     int n,A,B, ans = 0; cin >> n >> A >> B;
      |                ^~~
#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...