# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
396244 | giorgikob | Gap (APIO16_gap) | C++14 | 71 ms | 1180 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 ll long long
#define ff first
#define ss second
#define pb push_back
using namespace std;
//#include "game.h"
#include "gap.h"
ll answer = 0;
long long findGap(int T, int N)
{
ll l = -1, r = 1e18; r++;
ll cnt = 0;
int calls = 0;
ll len = -1;
if(T == 1){
while(true){
ll new_l,new_r;
if(len != -1){
if((r-l) < len/N) break;
}
cnt++;
if(answer >= r-l) break;
if(cnt > (N+1)/2){
if(l != r){
answer = max(answer,r-l);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |