| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 671091 | AdamGS | Gap (APIO16_gap) | C++17 | 53 ms | 1096 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 "gap.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF=1e18;
ll findGap(int t, int n) {
ll mi, ma;
MinMax(0, INF, &mi, &ma);
ll x=(ma-mi+n-2)/(n-1), ans=x;
ll lst=mi;
for(ll i=mi; i<=ma; i+=x+1) {
ll a, b;
MinMax(i, i+x, &a, &b);
if(a==-1) continue;
ans=max(ans, a-lst);
lst=b;
}
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
