Submission #1100327

#TimeUsernameProblemLanguageResultExecution timeMemory
1100327adkjtGap (APIO16_gap)C++14
0 / 100
39 ms2860 KiB
#include "gap.h" #include<bits/stdc++.h> #define ll long long using namespace std; ll pl,pr; ll l=0,r=1e18; long long findGap(int T, int N) { ll mx=0; if(T==1) { MinMax(l,r,&pl,&pr); l=pl,r=pr; for(int i=1;i<=(N+1)/2;i++){ MinMax(l+1,r-1,&pl,&pr); if(pl!=-1) mx=max(mx,abs(pl-l)); if(pr!=-1) mx=max(mx,abs(pr-l)); l=pl,r=pr; } } return mx; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...