제출 #405754

#제출 시각아이디문제언어결과실행 시간메모리
405754gevacrtGap (APIO16_gap)C++17
0 / 100
42 ms1856 KiB
#include<bits/stdc++.h> #include "gap.h" using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef vector<ll> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi; typedef vector<vii> vvii; #define INF INT_MAX #define MOD 1000000007 #define all(x) x.begin(), x.end() ll findGap(int T, int N){ if(T == 2) return 0; vi A(N); ll L = 0, R = 1e18; for(int l = 0, r = N-1; l <= r; l++, r--){ MinMax(L, R, &A[l], &A[r]); L + A[l]+1, R = A[r]-1; } ll ans = 0; for(int x = 0; x < N-1; x++) ans = max(ans, A[x+1]-A[x]); return ans; }

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:25:17: warning: value computed is not used [-Wunused-value]
   25 |         L + A[l]+1, R = A[r]-1;
      |         ~~~~~~~~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...