| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 405708 | inluminas | Gap (APIO16_gap) | C++14 | 71 ms | 2328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
vector<ll>a;
long long findGap(int T, int N)
{
ll mn,mx;
MinMax(0,1e18,&mn,&mx);
ll len=(mx-mn-1)/(N-1);
a.push_back(mn);
for(int i=1;i<=N-1;i++){
if(mn+1==mx-1){
a.push_back(mn+1);
break;
}
if(mn+1>mx-1) break;
ll coto,boro;
MinMax(mn+1,min(mx-1,mn+len+1),&coto,&boro);
mn=mn+1+len;
if(coto==-1){
continue;
}
a.push_back(coto);
if(coto!=boro) a.push_back(boro);
}
a.push_back(mx);
ll ans=0;
for(int i=1;i<a.size();i++){
ans=max(ans,a[i]-a[i-1]);
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
