답안 #926590

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
926590 2024-02-13T11:35:58 Z TAhmed33 이상한 기계 (APIO19_strange_device) C++
5 / 100
935 ms 34644 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128 ll2;
int main () {
    ll n, a, b; cin >> n >> a >> b;
    vector <pair <ll, ll>> arr(n); for (auto &[x, y] : arr) cin >> x >> y;
    ll2 u = a; u *= b; u /= __gcd(a, b + 1);
    if (n == 1) {
        ll2 x = arr[0].first, y = arr[0].second;
        ll2 t = y - x + 1; if (t > u) t = u;
        cout << (long long)t << '\n';
    }
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:7:47: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
    7 |     vector <pair <ll, ll>> arr(n); for (auto &[x, y] : arr) cin >> x >> y;
      |                                               ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 10 ms 860 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 1 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 935 ms 34644 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 935 ms 34644 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 935 ms 34644 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Incorrect 97 ms 5564 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 10 ms 860 KB Output isn't correct
3 Halted 0 ms 0 KB -