| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 94519 | hugo_pm | Gap (APIO16_gap) | C++14 | 50 ms | 1956 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <vector>
#include <iostream>
using namespace std;
typedef long long ll;
vector<ll> a;
long long findGap(int t, int n)
{
a.resize(n);
ll x = 0, y = (ll)(1e18);
int d = 0, f = n-1;
while (d <= f) {
MinMax(x, y, &x, &y);
a[d] = x;
a[f] = y;
++x; ++d;
--y; --f;
}
ll r = 0;
for (int i = 0; i < (n-1); ++i) {
r = max(r, a[i+1] - a[i]);
}
return r;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
