제출 #814961

#제출 시각아이디문제언어결과실행 시간메모리
81496112345678Gap (APIO16_gap)C++17
0 / 100
39 ms1896 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; #define ll long long long long findGap(int T, int N) { ll arr[N], x=0, y=1e18, a, b, idx=0, mx=0; while (1) { MinMax(x, y, &a, &b); if (a==-1) break; arr[idx]=a; arr[N-idx-1]=b; x=a+1; y=b-1; idx++; } for (int i=0; i<N-1; i++) mx=max(mx, arr[i+1]-arr[i]); return mx; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...