# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
406347 | p_square | Gap (APIO16_gap) | C++14 | 52 ms | 1908 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "gap.h"
#define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define ll long long
#define mp make_pair
#define se second
#define fi first
using namespace std;
ll findGap(int t, int n)
{
ll a[n];
ll l = 0, r = 1e18+1;
ll ptr1, ptr2;
for(int i = 0; 2*i<n; i++)
{
MinMax(l, r, &ptr1, &ptr2);
a[2*i] = ptr1;
if(2*i < n-1)
a[2*i+1] = ptr2;
l = ptr1 + 1;
r = ptr2 - 1;
}
sort(a, a+n);
ll ma = 0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |