답안 #972895

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
972895 2024-05-01T09:52:27 Z Unforgettablepl 이상한 기계 (APIO19_strange_device) C++17
0 / 100
0 ms 600 KB
#include <bits/stdc++.h>
using namespace std;

#define int long long

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,A,B;
    cin >> n >> A >> B;
    __int128 modulus;
    if((B+1)%A==0){
        modulus = B;
        return 1;
    } else {
        modulus = A*B;
    }
    set<__int128> answers;
    for(int i=1;i<=n;i++){
        int l,r;cin>>l>>r;
        for(int x=l;x<=r;x++){
            answers.insert(__int128(x)%modulus);
        }
    }
    cout << answers.size() << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 600 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 344 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 600 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -