답안 #43531

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
43531 2018-03-17T11:42:09 Z faustaadp Gap (APIO16_gap) C++14
8.44997 / 100
181 ms 40532 KB
#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 i,has;
vector<ll> v;
void tanya(ll aa,ll bb)
{
	if(aa>bb)
		return ;
	ll mi,ma;
	MinMax(aa,bb,&mi,&ma);
	if(mi==-1)
		return ;
	if(mi!=ma)
	{
		ll ce=(aa+bb)/2;
		tanya(aa,ce);
		tanya(ce+1,bb);
	}
	else
		v.pb(mi);
}
long long findGap(int T, int N)
{
	tanya(0,1e18);
	for(i=1;i<v.size();i++)
		has=max(has,v[i]-v[i-1]);
	return has;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:31:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(i=1;i<v.size();i++)
           ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 416 KB Output isn't correct
4 Incorrect 2 ms 436 KB Output isn't correct
5 Incorrect 2 ms 524 KB Output isn't correct
6 Incorrect 2 ms 532 KB Output isn't correct
7 Incorrect 2 ms 552 KB Output isn't correct
8 Incorrect 2 ms 644 KB Output isn't correct
9 Incorrect 2 ms 648 KB Output isn't correct
10 Incorrect 2 ms 672 KB Output isn't correct
11 Incorrect 4 ms 744 KB Output isn't correct
12 Incorrect 5 ms 772 KB Output isn't correct
13 Incorrect 4 ms 832 KB Output isn't correct
14 Incorrect 3 ms 876 KB Output isn't correct
15 Incorrect 3 ms 904 KB Output isn't correct
16 Incorrect 47 ms 1996 KB Output isn't correct
17 Incorrect 36 ms 2424 KB Output isn't correct
18 Incorrect 37 ms 3016 KB Output isn't correct
19 Incorrect 38 ms 3368 KB Output isn't correct
20 Incorrect 28 ms 3576 KB Output isn't correct
21 Incorrect 142 ms 6784 KB Output isn't correct
22 Incorrect 145 ms 8512 KB Output isn't correct
23 Incorrect 147 ms 10352 KB Output isn't correct
24 Incorrect 181 ms 12324 KB Output isn't correct
25 Incorrect 118 ms 13428 KB Output isn't correct
26 Incorrect 178 ms 15388 KB Output isn't correct
27 Incorrect 147 ms 17108 KB Output isn't correct
28 Incorrect 149 ms 18948 KB Output isn't correct
29 Incorrect 144 ms 20784 KB Output isn't correct
30 Incorrect 111 ms 21540 KB Output isn't correct
31 Incorrect 2 ms 21540 KB Output isn't correct
32 Incorrect 2 ms 21540 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 2 ms 21540 KB Partially correct
2 Partially correct 2 ms 21540 KB Partially correct
3 Partially correct 2 ms 21540 KB Partially correct
4 Partially correct 2 ms 21540 KB Partially correct
5 Partially correct 2 ms 21540 KB Partially correct
6 Partially correct 2 ms 21540 KB Partially correct
7 Partially correct 2 ms 21540 KB Partially correct
8 Partially correct 2 ms 21540 KB Partially correct
9 Partially correct 2 ms 21540 KB Partially correct
10 Partially correct 2 ms 21540 KB Partially correct
11 Partially correct 4 ms 21540 KB Partially correct
12 Partially correct 4 ms 21540 KB Partially correct
13 Partially correct 4 ms 21540 KB Partially correct
14 Partially correct 5 ms 21540 KB Partially correct
15 Partially correct 3 ms 21540 KB Partially correct
16 Partially correct 36 ms 21540 KB Partially correct
17 Partially correct 38 ms 21540 KB Partially correct
18 Partially correct 39 ms 21888 KB Partially correct
19 Partially correct 37 ms 22240 KB Partially correct
20 Partially correct 29 ms 22432 KB Partially correct
21 Partially correct 144 ms 25516 KB Partially correct
22 Partially correct 145 ms 27516 KB Partially correct
23 Partially correct 142 ms 29288 KB Partially correct
24 Partially correct 154 ms 31480 KB Partially correct
25 Partially correct 118 ms 32308 KB Partially correct
26 Partially correct 145 ms 34156 KB Partially correct
27 Partially correct 143 ms 36008 KB Partially correct
28 Partially correct 146 ms 37908 KB Partially correct
29 Partially correct 156 ms 39840 KB Partially correct
30 Partially correct 117 ms 40532 KB Partially correct
31 Partially correct 2 ms 40532 KB Partially correct
32 Partially correct 2 ms 40532 KB Partially correct