제출 #556430

#제출 시각아이디문제언어결과실행 시간메모리
556430InternetPerson10Gap (APIO16_gap)C++17
30 / 100
51 ms1880 KiB
#include "gap.h" #include <bits/stdc++.h> typedef long long ll; using namespace std; long long findGap(int T, int N) { if(T == 1 || T == 2) { vector<ll> nums(N); ll a, b, x, y, i = 0; a = 0, b = 1000000000000000000LL; while(i * 2 < N) { MinMax(a, b, &x, &y); nums[i] = x; nums[N - i - 1] = y; i++; a = x + 1; b = y - 1; } ll ans = 0; for(int i = 1; i < N; i++) { ans = max(ans, nums[i] - nums[i-1]); } return ans; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...