Submission #43532

# Submission time Handle Problem Language Result Execution time Memory
43532 2018-03-17T11:46:01 Z faustaadp Gap (APIO16_gap) C++14
9.93899 / 100
158 ms 3696 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!=ma)
	{
		ll ce=(aa+bb)/2;
		tanya(aa,max(ce,mi));
		tanya(min(ce+1,ma),bb);
	}
	else
		v.pb(mi);
}
long long findGap(int T, int N)
{
	ll L,R;
	MinMax(0,1e18,&L,&R);
	tanya(L,R);
	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++)
           ^
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Incorrect 2 ms 352 KB Output isn't correct
3 Incorrect 2 ms 428 KB Output isn't correct
4 Incorrect 2 ms 544 KB Output isn't correct
5 Incorrect 2 ms 544 KB Output isn't correct
6 Incorrect 2 ms 544 KB Output isn't correct
7 Incorrect 2 ms 548 KB Output isn't correct
8 Incorrect 2 ms 552 KB Output isn't correct
9 Incorrect 2 ms 552 KB Output isn't correct
10 Incorrect 2 ms 552 KB Output isn't correct
11 Incorrect 4 ms 552 KB Output isn't correct
12 Incorrect 3 ms 552 KB Output isn't correct
13 Incorrect 3 ms 600 KB Output isn't correct
14 Incorrect 3 ms 620 KB Output isn't correct
15 Incorrect 4 ms 620 KB Output isn't correct
16 Incorrect 40 ms 1512 KB Output isn't correct
17 Incorrect 35 ms 1512 KB Output isn't correct
18 Incorrect 37 ms 1512 KB Output isn't correct
19 Incorrect 37 ms 1512 KB Output isn't correct
20 Incorrect 35 ms 1512 KB Output isn't correct
21 Incorrect 143 ms 3564 KB Output isn't correct
22 Incorrect 137 ms 3564 KB Output isn't correct
23 Incorrect 158 ms 3564 KB Output isn't correct
24 Incorrect 148 ms 3564 KB Output isn't correct
25 Incorrect 118 ms 3564 KB Output isn't correct
26 Incorrect 148 ms 3564 KB Output isn't correct
27 Incorrect 144 ms 3564 KB Output isn't correct
28 Incorrect 140 ms 3564 KB Output isn't correct
29 Incorrect 145 ms 3696 KB Output isn't correct
30 Incorrect 115 ms 3696 KB Output isn't correct
31 Incorrect 2 ms 3696 KB Output isn't correct
32 Incorrect 1 ms 3696 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 3696 KB Partially correct
2 Partially correct 2 ms 3696 KB Partially correct
3 Partially correct 2 ms 3696 KB Partially correct
4 Partially correct 2 ms 3696 KB Partially correct
5 Partially correct 1 ms 3696 KB Partially correct
6 Partially correct 2 ms 3696 KB Partially correct
7 Partially correct 2 ms 3696 KB Partially correct
8 Partially correct 2 ms 3696 KB Partially correct
9 Partially correct 2 ms 3696 KB Partially correct
10 Partially correct 2 ms 3696 KB Partially correct
11 Partially correct 3 ms 3696 KB Partially correct
12 Partially correct 3 ms 3696 KB Partially correct
13 Partially correct 4 ms 3696 KB Partially correct
14 Partially correct 4 ms 3696 KB Partially correct
15 Partially correct 3 ms 3696 KB Partially correct
16 Partially correct 34 ms 3696 KB Partially correct
17 Partially correct 34 ms 3696 KB Partially correct
18 Partially correct 34 ms 3696 KB Partially correct
19 Partially correct 37 ms 3696 KB Partially correct
20 Partially correct 28 ms 3696 KB Partially correct
21 Partially correct 137 ms 3696 KB Partially correct
22 Partially correct 146 ms 3696 KB Partially correct
23 Partially correct 143 ms 3696 KB Partially correct
24 Partially correct 138 ms 3696 KB Partially correct
25 Partially correct 116 ms 3696 KB Partially correct
26 Partially correct 137 ms 3696 KB Partially correct
27 Partially correct 145 ms 3696 KB Partially correct
28 Partially correct 139 ms 3696 KB Partially correct
29 Partially correct 146 ms 3696 KB Partially correct
30 Partially correct 107 ms 3696 KB Partially correct
31 Partially correct 2 ms 3696 KB Partially correct
32 Partially correct 2 ms 3696 KB Partially correct