| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1352787 | KALARRY | Gap (APIO16_gap) | C++20 | 28 ms | 1168 KiB |
//chockolateman
#include<bits/stdc++.h>
#include "gap.h"
using namespace std;
long long findGap(int T, int N)
{
long long reta;
long long retb;
MinMax(0,1e18,&reta,&retb);
long long mn = reta;
long long mx = retb;
long long K = ceil((mx - mn)/(N-1.00));
long long start = mn;
long long pos = start + 1;
while(start < mx)
{
MinMax(pos,pos+K,&reta,&retb);
pos = pos + K + 1;
if(reta != -1)
{
K = max(K,reta - start);
start = retb;
pos = start + 1;
}
}
return K;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
