제출 #876450

#제출 시각아이디문제언어결과실행 시간메모리
876450AlphaMale06Gap (APIO16_gap)C++14
0 / 100
28 ms3808 KiB
#include<bits/stdc++.h> #include "gap.h" using namespace std; using ll=long long; long long findGap(int subt, int n){ if(subt==1){ ll mn=0; ll mx=1e18; ll a[n]; for(int i=0; i< n/2; i++){ MinMax(mn, mx, &mn, &mx); a[i]=mn; a[n-i-1]=mx; mn++; mx--; } if(n&1)a[n/2]=mn; ll ans=0; for(int i=1; i<n; i++){ ans=max(ans, a[i]-a[i-1]); } return ans; } else{ } }

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...