답안 #42636

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
42636 2018-03-01T15:48:37 Z fefe Gap (APIO16_gap) C++14
0 / 100
63 ms 1512 KB
#include "gap.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;
		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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 248 KB Output is correct
2 Runtime error 1 ms 352 KB Execution failed because the return code was nonzero
3 Runtime error 2 ms 352 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 412 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 412 KB Execution failed because the return code was nonzero
6 Correct 1 ms 460 KB Output is correct
7 Correct 1 ms 460 KB Output is correct
8 Correct 1 ms 496 KB Output is correct
9 Correct 1 ms 496 KB Output is correct
10 Correct 1 ms 496 KB Output is correct
11 Correct 2 ms 496 KB Output is correct
12 Correct 2 ms 496 KB Output is correct
13 Correct 2 ms 560 KB Output is correct
14 Correct 2 ms 604 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 15 ms 732 KB Output is correct
17 Correct 14 ms 732 KB Output is correct
18 Correct 14 ms 732 KB Output is correct
19 Correct 14 ms 732 KB Output is correct
20 Correct 10 ms 732 KB Output is correct
21 Correct 54 ms 1372 KB Output is correct
22 Correct 54 ms 1372 KB Output is correct
23 Correct 55 ms 1372 KB Output is correct
24 Correct 60 ms 1376 KB Output is correct
25 Correct 47 ms 1376 KB Output is correct
26 Correct 60 ms 1376 KB Output is correct
27 Correct 63 ms 1376 KB Output is correct
28 Correct 55 ms 1376 KB Output is correct
29 Correct 54 ms 1376 KB Output is correct
30 Correct 41 ms 1376 KB Output is correct
31 Correct 1 ms 1376 KB Output is correct
32 Correct 1 ms 1376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1376 KB Output isn't correct
2 Incorrect 1 ms 1376 KB Output isn't correct
3 Incorrect 1 ms 1376 KB Output isn't correct
4 Incorrect 1 ms 1376 KB Output isn't correct
5 Incorrect 1 ms 1376 KB Output isn't correct
6 Incorrect 1 ms 1376 KB Output isn't correct
7 Incorrect 1 ms 1376 KB Output isn't correct
8 Incorrect 1 ms 1376 KB Output isn't correct
9 Incorrect 1 ms 1376 KB Output isn't correct
10 Incorrect 1 ms 1376 KB Output isn't correct
11 Incorrect 2 ms 1376 KB Output isn't correct
12 Incorrect 2 ms 1376 KB Output isn't correct
13 Incorrect 2 ms 1376 KB Output isn't correct
14 Incorrect 2 ms 1376 KB Output isn't correct
15 Incorrect 2 ms 1376 KB Output isn't correct
16 Incorrect 11 ms 1376 KB Output isn't correct
17 Incorrect 8 ms 1376 KB Output isn't correct
18 Incorrect 8 ms 1376 KB Output isn't correct
19 Incorrect 9 ms 1376 KB Output isn't correct
20 Incorrect 5 ms 1376 KB Output isn't correct
21 Incorrect 29 ms 1388 KB Output isn't correct
22 Incorrect 31 ms 1388 KB Output isn't correct
23 Incorrect 30 ms 1392 KB Output isn't correct
24 Incorrect 29 ms 1460 KB Output isn't correct
25 Incorrect 22 ms 1460 KB Output isn't correct
26 Incorrect 30 ms 1460 KB Output isn't correct
27 Incorrect 28 ms 1460 KB Output isn't correct
28 Incorrect 31 ms 1512 KB Output isn't correct
29 Incorrect 29 ms 1512 KB Output isn't correct
30 Incorrect 15 ms 1512 KB Output isn't correct
31 Incorrect 1 ms 1512 KB Output isn't correct
32 Incorrect 2 ms 1512 KB Output isn't correct