제출 #409682

#제출 시각아이디문제언어결과실행 시간메모리
409682naranbatGap (APIO16_gap)C++17
0 / 100
41 ms1844 KiB
#include "gap.h"
#include<bits/stdc++.h>
const long long INF = 1e18 + 6;
using namespace std;

long long a[100005];

long long findGap(int T, int N)
{
	if(T == 1){
		int l = 0;
		int r = N - 1;
		long long mn = 0, mx = 1e18;
		long long h,h1;
		while(l <= r){
			MinMax(mn, mx, &h, &h1);
			a[l] = h;
			a[r] = h1;
			l++;
			r--;
		}
		long long ans = 0;
		for(int i = 1; i < N; i++){
			ans = max(ans,a[i] - a[i - 1]);
		}
		return ans;
	}
	else{
		return 7;
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...