| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 742897 | vjudge1 | Gap (APIO16_gap) | C++17 | 47 ms | 1196 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>
#include "gap.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define ent "\n"
const int maxn = 1e6 + 100;
const ll INF = (1ll<<61);
const int MOD = 1e9 + 7;
const int inf = (1<<30);
const int maxl = 20;
const int P = 31;
ll findGap(int t, int n){
if(t == 1){
ll l = -1;
ll r = 1e18 + 1;
ll ans = 0;
while(true){
ll tl, tr;
if(l + 1 > r - 1) break;
MinMax(l + 1, r - 1, &tl, &tr);
if(tl == -1) break;
if(l != -1){
ans = max(ans, tl - l);
ans = max(ans, r - tr);
}
l = tl;
r = tr;
}
if(l < r) ans = max(ans, r - l);
return ans;
} else{
}
}Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
