제출 #1363027

#제출 시각아이디문제언어결과실행 시간메모리
1363027akqxolotlGap (APIO16_gap)C++20
0 / 100
25 ms1992 KiB


#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int> vi;
typedef pair<int,int> pii;
#define fi first
#define se second
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<" is "<<x<<endl;
#define debugl(x) cerr<<#x<<" is ";for(auto p:x)cerr<<p<<' ';cerr<<endl;
#define pb push_back

long long findGap(signed T, signed N) {
	int a[N];
	int a0,an;
	MinMax(0,(int)1e18,&a0,&an);
	a[0]=a0;
	a[N-1]=an;
	for(int i=1;i<=N/2;i++){
		MinMax(a[i-1]+1,a[N-i]-1,&a0,&an);
		a[i]=a0;
		a[N-i-1]=an;
	}
	//debugl(a)
	int ans=0;
	for(int i=0;i<N-1;i++){
		ans=max(ans,a[i+1]-a[i]);
	}
	return ans;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…