제출 #560881

#제출 시각아이디문제언어결과실행 시간메모리
560881karriganGap (APIO16_gap)C++14
30 / 100
53 ms1872 KiB
#include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr); #include "gap.h" using namespace std; const int maxn=1e6; using ll=long long int; long long a[100009]; long long findGap(int t, int n){ if (t==1){ a[0]=-1; a[n+1]=2e18; for (int i=1,j=n;i<=j;i++,j--){ MinMax(a[i-1]+1, a[j+1]-1, &a[i], &a[j]); } long long ans=-1; for (int i=2;i<=n;i++){ ans=max(ans,a[i]-a[i-1]); } return ans; } }

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

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