이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll ma,L,R,gm,i,LT,RT;
vector<ll> v;
long long findGap(int T, int N)
{
ma=0;
MinMax(0,(ll)1e18,&L,&R);
gm=(R-L)/(N-1);
for(i=L;i<R;i+=(gm+1))
{
//cout<<i<<" "<<min(i+gm,R)<<"\n";
MinMax(i,min(i+gm,R),<,&RT);
if(LT!=-1)
v.pb(LT);
if(LT!=RT)
v.pb(RT);
}
for(i=1;i<v.size();i++)
ma=max(ma,v[i]-v[i-1]);
return ma;
}
컴파일 시 표준 에러 (stderr) 메시지
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:25:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=1;i<v.size();i++)
~^~~~~~~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |