답안 #748340

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
748340 2023-05-26T06:59:53 Z Sharky 이상한 기계 (APIO19_strange_device) C++17
0 / 100
5000 ms 524288 KB
#include <bits/stdc++.h>
using namespace std;

#define int long long

int32_t main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int n, A, B, ans = 0;
    cin >> n >> A >> B;
    map<int, bool> mp;
    int mul = 3E18;
    if (3E18 / A >= B) mul = A * B;
    for (int i = 0; i < n; i++) {
        int l, r;
        cin >> l >> r;
        for (int j = l; j <= r; j++) mp[j % mul] = 1;
    }
    for (auto& [key, x] : mp) ans += x;
    cout << ans << '\n';
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 46 ms 12364 KB Output is correct
3 Correct 64 ms 17844 KB Output is correct
4 Incorrect 3 ms 980 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Runtime error 2910 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 105 ms 32212 KB Output is correct
3 Correct 106 ms 32048 KB Output is correct
4 Correct 104 ms 30536 KB Output is correct
5 Execution timed out 5057 ms 62408 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 512 ms 62872 KB Output is correct
3 Runtime error 1627 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 512 ms 62872 KB Output is correct
3 Runtime error 1627 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 512 ms 62872 KB Output is correct
3 Runtime error 1627 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Runtime error 1653 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 46 ms 12364 KB Output is correct
3 Correct 64 ms 17844 KB Output is correct
4 Incorrect 3 ms 980 KB Output isn't correct
5 Halted 0 ms 0 KB -