# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
284832 | triplem5ds | Gap (APIO16_gap) | C++14 | 0 ms | 0 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;
long long findGap(int T, int N)
{
if(T == 2){
long long cur = 0;
vector<long long > vr;
long long ans = 0;
for(int i = 0; i < N; i++){
long long mn, mx;
MinMax(cur, cur, mn, mx);
vr.push_back(mn);
cur = mn + 1;
if(i)ans = max(ans, vr[i] - vr[i-1]);
}
}
return ans;
}