제출 #182412

#제출 시각아이디문제언어결과실행 시간메모리
182412AQTGap (APIO16_gap)C++14
0 / 100
58 ms3960 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 = 0, lstr = 1000000000000000000LL; 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...