Submission #926590

#TimeUsernameProblemLanguageResultExecution timeMemory
926590TAhmed33Strange Device (APIO19_strange_device)C++98
5 / 100
935 ms34644 KiB
#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 (stderr)

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;
      |                                               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...