# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
408957 | MohamedAhmed04 | Strange Device (APIO19_strange_device) | C++14 | 551 ms | 25312 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std ;
const long long inf = 4e18 ;
const int MAX = 1e5 + 10 ;
bool Overflow_Mul(long double x , long double y)
{
return (x * y > inf) ;
}
int arr[MAX] ;
int n ;
long long a , b ;
vector< pair<long long , long long> >vp ;
int main()
{
ios_base::sync_with_stdio(0) ;
cin.tie(0) ;
cin>>n>>a>>b ;
long long x = a / __gcd(a , b+1ll) ;
if(Overflow_Mul(x , b))
x = inf ;
else
x *= b ;
long long st = -1 ;
for(int i = 0 ; i < n ; ++i)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |