제출 #182414

#제출 시각아이디문제언어결과실행 시간메모리
182414AQTGap (APIO16_gap)C++14
30 / 100
60 ms2052 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; long long arr[100005]; long long findGap(int T, int N){ int l = 1, r = N; long long lstl = -1, lstr = 1000000000000000001LL; while(l <= r){ MinMax(lstl+1, lstr-1, &lstl, &lstr); arr[l++] = lstl, arr[r--] = lstr; } long long ans = 0; for(int i = 2; i<=N; i++){ ans = max(ans, arr[i]-arr[i-1]); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...