제출 #242067

#제출 시각아이디문제언어결과실행 시간메모리
242067michaoGap (APIO16_gap)C++14
0 / 100
60 ms2724 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; typedef long long ll; #define pb push_back int n; vector<ll>pom,answer; long long findGap(int t, int N) { n=N; ll ans=0; ll ip=-1,ik=1e18+9; if (t==1) { while ((int)answer.size()+(int)pom.size()<n) { ip++,ik--; MinMax(ip,ik,&ip,&ik); answer.pb(ip); pom.pb(ik); } } else { assert(false); } while ((int)pom.size()>0)answer.pb(pom.back()),pom.pop_back(); for (int i=0;i<(int)answer.size()-1;i++)ans=max(ans,answer[i+1]-answer[i]); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...