# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
296408 | 2020-09-10T14:24:45 Z | CaroLinda | Strange Device (APIO19_strange_device) | C++14 | 1 ms | 512 KB |
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization ("unroll-loops") #pragma GCC optimization ("O2") #define lp(i,a,b) for(int i = a; i < b; i++) #define pb push_back #define sz(x) (int)(x.size()) #define all(x) x.begin(),x.end() #define debug printf #define tiii tuple<int,int,int> #define mkt make_tuple #define pii pair<int,int> #define mk make_pair #define ll long long #define ff first #define ss second using namespace std ; int N ; set< pair<ll,ll> > s ; ll A , B , G ; int main() { scanf("%d%lld%lld", &N , &A, &B ) ; assert(N == 1) ; G = __gcd(A,B+1) ; G = A/G ; ll L , R ; scanf("%lld %lld", &L , &R ) ; printf("%lld\n", min(G*B, R - L + 1) ) ; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 0 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 256 KB | Output is correct |
5 | Incorrect | 1 ms | 256 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |