# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126546 | DodgeBallMan | Strange Device (APIO19_strange_device) | C++14 | 675 ms | 42304 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>
#define pll pair<long long, long long>
#define x first
#define y second
using namespace std;
const long long inf = 1000000000000000000;
int n;
long long a, b, ans, sum;
vector<pll> seg, m;
int chk( long long a, long long b ) {
long long temp;
temp = inf / a;
if( b > temp ) return 1;
else return 0 ;
}
void process( long long mul ) {
//cout << mul << endl;
for( int i = 1 ; i < ( int )seg.size() ; i++ ) {
if( seg[i].y - seg[i].x + 1 >= mul ) {
printf("%lld",mul);
return ;
}
long long f = seg[i].x % mul, t = seg[i].y % mul;
if( t < f ) m.emplace_back( pll( f, mul - 1 ) ), m.emplace_back( pll( 0, t ) );
else m.emplace_back( pll( f, t ) );
}
Compilation message (stderr)
# | 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... |