제출 #108457

#제출 시각아이디문제언어결과실행 시간메모리
108457nxteruGap (APIO16_gap)C++14
0 / 100
72 ms3908 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; typedef long long ll; #define PB push_back ll ans,mn,mx,n; long long findGap(int t, int N) { n=N; if(t==1){ ll l=-1,r=1e18+1; vector<ll>x,y; while(l+1<=r-1){ l++,r--; MinMax(l,r,&l,&r); x.PB(l); y.PB(r); } for(int i=y.size()-1;i>=0;i--)x.PB(y[i]); for(int i=0;i+1<x.size();i++)ans=max(ans,x[i+1]-x[i]); return ans; } }

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:20:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i+1<x.size();i++)ans=max(ans,x[i+1]-x[i]);
               ~~~^~~~~~~~~
gap.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...