답안 #258911

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
258911 2020-08-06T17:51:37 Z parsa_mobed 이상한 기계 (APIO19_strange_device) C++14
0 / 100
5000 ms 48120 KB
#include <bits/stdc++.h>

using namespace std;
#define int long long
const int N = 1e6 + 5;
int l[N], r[N], mark[N];

int32_t main() {
	int n, A, B, ans = 0; cin >> n >> A >> B;
	A = A / __gcd(A, B + 1);
	for (int i = 0; i < n; i++) {
		cin >> l[i] >> r[i];
		for (int j = l[i]; j <= r[i]; j++) if (!mark[j%(A*B)]) mark[j%(A*B)] = 1, ans++;
	}
	cout << ans << "\n";

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Runtime error 2 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Runtime error 58 ms 48120 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 14 ms 5120 KB Output is correct
3 Correct 14 ms 4992 KB Output is correct
4 Correct 13 ms 4736 KB Output is correct
5 Execution timed out 5075 ms 8304 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Incorrect 2064 ms 23164 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Incorrect 2064 ms 23164 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Incorrect 2064 ms 23164 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Runtime error 2 ms 416 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Runtime error 2 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -