답안 #979814

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
979814 2024-05-11T12:07:55 Z kayn 이상한 기계 (APIO19_strange_device) C++14
0 / 100
5000 ms 524288 KB
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define run ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
ll n, a, b, l, r, ans;

int main(){
	cin >> n >> a >> b;
	set<pll> s;
	for(int i=1; i<=n; i++){
		cin >> l >> r;
		for(int t=l; t<=r; t++){
			s.insert({(t+t/b)%a, t%b});
		}
	}
	cout << s.size() << endl;
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Execution timed out 5091 ms 405260 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Runtime error 2097 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Execution timed out 5047 ms 60500 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5050 ms 77652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5050 ms 77652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5050 ms 77652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 600 KB Output is correct
2 Runtime error 1146 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Execution timed out 5091 ms 405260 KB Time limit exceeded
3 Halted 0 ms 0 KB -