Submission #42635

# Submission time Handle Problem Language Result Execution time Memory
42635 2018-03-01T15:47:23 Z fefe Gap (APIO16_gap) C++14
0 / 100
57 ms 1392 KB
#include "gap.h"
#include<stdio.h>
#define f MinMax
#define max(x,y) ((x)>(y)?(x):(y))
long long findGap(int T, int N)
{
	long long s,e,ps,pe,maxx=0;
	if(T==1){
		f(0,(1LL<<62),&ps,&pe);
		N-=2;
		if(N==0)	return pe-ps;
		while(N){
			f(ps+1,pe-1,&s,&e);
			N-=2;
			maxx=max(maxx,max(s-ps,pe-e));
			ps=s;pe=e;
		}
		return max(maxx,pe-ps);
	}
	
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Output is correct
2 Runtime error 2 ms 352 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 424 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 424 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 504 KB Execution failed because the return code was nonzero
6 Correct 1 ms 516 KB Output is correct
7 Correct 1 ms 516 KB Output is correct
8 Correct 1 ms 528 KB Output is correct
9 Correct 1 ms 528 KB Output is correct
10 Correct 1 ms 528 KB Output is correct
11 Correct 3 ms 556 KB Output is correct
12 Correct 3 ms 556 KB Output is correct
13 Correct 2 ms 556 KB Output is correct
14 Correct 3 ms 556 KB Output is correct
15 Correct 2 ms 560 KB Output is correct
16 Correct 16 ms 684 KB Output is correct
17 Correct 15 ms 704 KB Output is correct
18 Correct 15 ms 748 KB Output is correct
19 Correct 15 ms 748 KB Output is correct
20 Correct 10 ms 752 KB Output is correct
21 Correct 55 ms 1392 KB Output is correct
22 Correct 54 ms 1392 KB Output is correct
23 Correct 53 ms 1392 KB Output is correct
24 Correct 57 ms 1392 KB Output is correct
25 Correct 46 ms 1392 KB Output is correct
26 Correct 55 ms 1392 KB Output is correct
27 Correct 57 ms 1392 KB Output is correct
28 Correct 56 ms 1392 KB Output is correct
29 Correct 54 ms 1392 KB Output is correct
30 Correct 41 ms 1392 KB Output is correct
31 Correct 1 ms 1392 KB Output is correct
32 Correct 1 ms 1392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 1392 KB Output isn't correct
2 Incorrect 1 ms 1392 KB Output isn't correct
3 Incorrect 2 ms 1392 KB Output isn't correct
4 Incorrect 1 ms 1392 KB Output isn't correct
5 Incorrect 1 ms 1392 KB Output isn't correct
6 Incorrect 1 ms 1392 KB Output isn't correct
7 Incorrect 2 ms 1392 KB Output isn't correct
8 Incorrect 1 ms 1392 KB Output isn't correct
9 Incorrect 1 ms 1392 KB Output isn't correct
10 Incorrect 2 ms 1392 KB Output isn't correct
11 Incorrect 2 ms 1392 KB Output isn't correct
12 Incorrect 2 ms 1392 KB Output isn't correct
13 Incorrect 2 ms 1392 KB Output isn't correct
14 Incorrect 2 ms 1392 KB Output isn't correct
15 Incorrect 2 ms 1392 KB Output isn't correct
16 Incorrect 8 ms 1392 KB Output isn't correct
17 Incorrect 8 ms 1392 KB Output isn't correct
18 Incorrect 8 ms 1392 KB Output isn't correct
19 Incorrect 9 ms 1392 KB Output isn't correct
20 Incorrect 5 ms 1392 KB Output isn't correct
21 Incorrect 30 ms 1392 KB Output isn't correct
22 Incorrect 30 ms 1392 KB Output isn't correct
23 Incorrect 29 ms 1392 KB Output isn't correct
24 Incorrect 29 ms 1392 KB Output isn't correct
25 Incorrect 21 ms 1392 KB Output isn't correct
26 Incorrect 31 ms 1392 KB Output isn't correct
27 Incorrect 30 ms 1392 KB Output isn't correct
28 Incorrect 31 ms 1392 KB Output isn't correct
29 Incorrect 29 ms 1392 KB Output isn't correct
30 Incorrect 15 ms 1392 KB Output isn't correct
31 Incorrect 1 ms 1392 KB Output isn't correct
32 Incorrect 2 ms 1392 KB Output isn't correct