| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 95679 | errorgorn | Gap (APIO16_gap) | C++14 | 85 ms | 2432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
long long findGap(int T, int N){
vector<long long> v;
long long small,big;
MinMax(0,1000000000000000000,&small,&big);
long long gap=(big-small)/((long long) N-1);
long long si=small,se=small+(gap++);
long long mn,mx;
while (si<=big){
MinMax(si,se,&mn,&mx);
if(mn!=-1){
v.push_back(mn);
if (mx!=mn) v.push_back(mx);
}
si+=gap,se+=gap;
}
long long maximal=0;
for (int it=1;it<v.size();it++){
maximal=max(maximal,v[it]-v[it-1]);
}
return maximal;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
