제출 #875941

#제출 시각아이디문제언어결과실행 시간메모리
875941PagodePaivaGap (APIO16_gap)C++17
30 / 100
32 ms2240 KiB
#include<bits/stdc++.h>
#define MAXN 100010

using namespace std;

#include "gap.h"

int query(long long a, long long b, long long &x, long long &y){
    MinMax(a, b, &x, &y);
    return 0;
}

long long res[MAXN];

long long findGap(int T, int n){
    long long l = 0, r = 1e18;

    for(int i = 0;i < (n+1)/2;i++){
        query(l, r, res[i], res[n-i-1]);
        // cout << res[i] << 
        l = res[i]+1;
        r = res[n-i-1]-1;
    }

    long long resp = 0;

    for(int i = 1;i < n;i++){
        resp = max(resp, res[i] - res[i-1]);
    }

    return resp;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...