| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1303871 | nathlol2 | Gap (APIO16_gap) | C++20 | 29 ms | 3232 KiB |
#include "gap.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll findGap(int T, int N){
ll a[N + 1];
for(int i = 0;i<(N + 1) / 2;i++){
ll mn, mx;
if(i == 0){
MinMax(0, (long long)1e18, &mn, &mx);
}else{
MinMax(a[i] + 1, a[N - i + 1] - 1, &mn, &mx);
}
a[i + 1] = mn;
a[N - i] = mx;
}
ll ans = 0;
for(int i = 1;i<N;i++){
ans = max(ans, a[i + 1] - a[i]);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
