제출 #96329

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
963292019-02-08 14:10:54ShaneOngGap (APIO16_gap)C++14
0 / 100
89 ms1788 KiB
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
long long findGap(int T, int n){
long long ans=0ll;
//if(T==1){
long long l=0ll,r=1000000000000000000ll;
MinMax(l,r,&l,&r);
int temp=2;
long long interv = (r-l)/(n-1ll),pre=-1ll;
for(int x=0;x<n-2;x++){
long long a=l+x*interv,b=l+(x+1ll)*interv,c,d;
MinMax(a,b,&c,&d);
if(c!=-1ll){
ans=max(ans,d-c);
if(pre!=-1ll)
ans=max(ans,c-pre);
pre=d;
}
}
ans=max(ans,r-pre);
//}
return ans;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:13: warning: unused variable 'temp' [-Wunused-variable]
         int temp=2;
             ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...