| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1137407 | owoovo | Gap (APIO16_gap) | C++20 | 32 ms | 2328 KiB |
#include "gap.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
using namespace std;
const ll maxn=1e18;
ll findGap(int T, int N){
vector<ll> hv;
ll mn=-1,mx=maxn+1,cnt=N;
while(cnt>0){
MinMax(mn+1,mx-1,&mn,&mx);
hv.push_back(mn);
hv.push_back(mx);
cnt-=2;
}
sort(hv.begin(),hv.end());
hv.erase(unique(hv.begin(),hv.end()),hv.end());
ll ans=0;
for(int i=1;i<hv.size();i++){
ans=max(ans,hv[i]-hv[i-1]);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
