| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1325152 | riafhasan2010 | Gap (APIO16_gap) | C++17 | 28 ms | 2360 KiB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long findGap(int T, int n) {
ll mn = 0, mx = 1e18, ans = 0, last = 0;
vector<ll> a;
for (int i = 1; i <= n; i++) {
MinMax(mn + 1, mx - 1, &mn, &mx);
a.push_back(mn);
a.push_back(mx);
}
sort(a.begin(), a.end());
for (int i = 1; i < a.size(); i++) {
ans = max(ans, a[i] - a[i - 1]);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
