# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
440789 | hibye1217 | Gap (APIO16_gap) | C++17 | 118 ms | 1844 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.
#ifndef NOTSUBMIT
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#endif
// Subtask 1 Only
ll arr[100020];
ll findGap(int T, int N){
if (T == 1){
ll mn = 0, mx = 1e18;
int st = 1, ed = N;
while (st <= ed){
MinMax(mn, mx, &arr[st], &arr[ed]);
mn = arr[st]+1; mx = arr[ed]-1;
st += 1; ed -= 1;
}
ll ans = 0;
for (int i = 1; i < N; i++){
ans = max(ans, arr[i+1] - arr[i]);
}
return ans;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |