| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 882390 | dubabuba | Gap (APIO16_gap) | C++14 | 46 ms | 4648 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
ll findGap(int T, int N) {
ll L, R;
MinMax(0LL, (ll)1e18, &L, &R);
ll d = (R - L) / N;
ll mn[N], mx[N];
mn[0] = L, mx[N - 1] = R;
ll st = L;
for(int i = 0; i < N; i++) {
MinMax(st, (i == N - 1) ? N - 1 : st + d - 1, &mn[i], &mx[i]);
st += d;
}
ll ans = 0;
for(int i = 1; i < N; i++)
ans = max(ans, mn[i] - mx[i - 1]);
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
