| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1073489 | clementine | Gap (APIO16_gap) | C++17 | 23 ms | 4696 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long findGap(int T, int N)
{
	ll l = 0;
	ll r = 10e8;
	vector<ll> left, right;
	int calls = (N + 1) / 2;
	ll mn, mx;
	for(int j = 1; j <= calls; j ++)
	{
		MinMax(l, r, &mn, &mx);
		if(mn != mx)
		{
			right.push_back(mx);
		}
		left.push_back(mn);
		l = mn + 1;
		r = mx - 1;
	}
	ll mxdif = 0;
	for(int i = 0; i <left.size() - 1; i ++)
	{
		mxdif = max(mxdif, left[i + 1] - left[i]);
	}
	for(int i = right.size() - 1; i >=1; i --)
	{
		mxdif = max(mxdif, right[i] - right[i-1]);
	}
	/*
	for(auto val:left)
	{
		cout<< val <<" " ;
	}
	cout << '\n';
	for(auto val:right)
	{
		cout<< val <<" " ;
	}*/
	int s= left.size();
	int u = right.size();
	mxdif=max(mxdif, right[u-1] - left[s-1]);
	return mxdif;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
