제출 #42629

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
426292018-03-01 14:51:27MatheusLealVGap (APIO16_gap)C++14
4.83 / 100
1840 ms2924 KiB
#include <bits/stdc++.h>
#include "gap.h"
#define N 100005
#define inf 1000000000000000000LL
using namespace std;
typedef long long ll;
ll n, v[N], ans[N];
vector<ll> val;
void solve(ll ini, ll fim)
{
if(ini == fim)
{
val.push_back(ini);
return;
}
ll mid = (ini + fim)/2;
ll a, b;
MinMax(mid + 1, fim, &a, &b);
//cout<<mid + 1<<" "<<fim<<" "<<a<<" "<<b<<"\n";
if(a != -1 && b != -1) solve(mid + 1, fim);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:70:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 1; i < val.size(); i++) best = max(best, val[i] - val[i - 1]);
                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...