Submission #569026

#TimeUsernameProblemLanguageResultExecution timeMemory
569026BadPenaltyGap (APIO16_gap)C++14
30 / 100
51 ms1872 KiB
#include "gap.h" #include "bits/stdc++.h" using namespace std; long long findGap(int T, int N) { vector<long long>ll(N+10); long long a = 0,b = 1e18; for(int i = 1;i<=N;i++) { if(ll[i])break; MinMax(a,b,&a,&b); ll[i] = a,ll[N-i+1] = b; a++,b--; } long long ans = 0; for(int i = 2;i<=N;i++) { ans = max(ans,ll[i]-ll[i-1]); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...