Submission #487466

#TimeUsernameProblemLanguageResultExecution timeMemory
487466leakedGap (APIO16_gap)C++14
30 / 100
44 ms5052 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; long long findGap(int T, int N) { long long x=0,y=1e18; vector<long long>vc; while(N>=1){ long long *a,*b; a=new long long(),b=new long long(); MinMax(x,y,a,b); x=*a,y=*b; vc.push_back(x); vc.push_back(y); x++;y--; N-=2; } sort(vc.begin(),vc.end()); long long ans=0; for(int i=1;i<(int)vc.size();i++) ans=max(ans,vc[i]-vc[i-1]); return ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...