| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1318590 | khanhphucscratch | Gap (APIO16_gap) | C++20 | 39 ms | 1184 KiB |
#include "gap.h"
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int inf = 1e18;
long long findGap(int32_t T, int32_t n)
{
int ans = 0, l, r;
MinMax(1ll, inf, &l, &r);
int step = (r-l-1) / (n-1), cur = l+1, last = l;
while(cur < r){
int x, y; MinMax(cur, min(cur+step-1, r-1), &x, &y);
if(x > -1){
ans = max(ans, x - last);
last = y;
}
cur += step;
}
ans = max(ans, r-last);
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
