제출 #1317561

#제출 시각아이디문제언어결과실행 시간메모리
1317561eri16Gap (APIO16_gap)C++20
0 / 100
2096 ms2328 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; using ll = long long; ll findGap(int t, int n){ vector <ll> v; ll curmn=0,curmx=1e18,mn,mx; while (curmn<=curmx){ MinMax(curmn,curmx,&mn,&mx); if (mn!=-1){v.push_back(mn);curmn=mn+1;} if (mx!=-1){v.push_back(mx);curmx=mx-1;} } sort(v.begin(),v.end()); ll ans=0; for (int i=1; i<n; i++){ ans=max(ans,v[i]-v[i-1]); } }

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

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
   27 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...