답안 #773856

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
773856 2023-07-05T09:10:12 Z Aminjin Gap (APIO16_gap) C++14
0 / 100
39 ms 1952 KB
#include "gap.h"
#include<iostream>
using namespace std;


long long findGap(int T, int N)
{
	long long mn, mx, i, j;
	long long a[N+1];

	MinMax(0,1000000000000000000, &mn, &mx);
	a[1] = mn; a[N] = mx;
	i = 1; j = N;
	
	while ( mn != -1 && mx != -1 ) {
		MinMax(mn+1, mx-1, &mn, &mx);
		i ++; j --;
		if ( mn == -1 ) break;
		a[i] = mn; a[j] = mx;
	}

  long long diff = 0;
  for ( i = 1; i < N; i ++ ) {
    diff = max(diff, a[i+1] - a[i]);
	}

	return diff;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Output isn't correct
2 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
3 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
4 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
6 Incorrect 0 ms 208 KB Output isn't correct
7 Incorrect 0 ms 208 KB Output isn't correct
8 Incorrect 1 ms 208 KB Output isn't correct
9 Incorrect 0 ms 208 KB Output isn't correct
10 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
11 Incorrect 1 ms 336 KB Output isn't correct
12 Incorrect 1 ms 336 KB Output isn't correct
13 Incorrect 1 ms 336 KB Output isn't correct
14 Incorrect 1 ms 336 KB Output isn't correct
15 Incorrect 1 ms 336 KB Output isn't correct
16 Incorrect 8 ms 712 KB Output isn't correct
17 Incorrect 8 ms 812 KB Output isn't correct
18 Incorrect 8 ms 680 KB Output isn't correct
19 Incorrect 8 ms 660 KB Output isn't correct
20 Runtime error 7 ms 720 KB Execution failed because the return code was nonzero
21 Incorrect 32 ms 1836 KB Output isn't correct
22 Incorrect 30 ms 1856 KB Output isn't correct
23 Incorrect 29 ms 1840 KB Output isn't correct
24 Incorrect 33 ms 1804 KB Output isn't correct
25 Incorrect 26 ms 1856 KB Output isn't correct
26 Incorrect 30 ms 1856 KB Output isn't correct
27 Incorrect 36 ms 1828 KB Output isn't correct
28 Incorrect 33 ms 1868 KB Output isn't correct
29 Incorrect 31 ms 1856 KB Output isn't correct
30 Runtime error 25 ms 1860 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
32 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 208 KB Output is correct
2 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
3 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
5 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
6 Partially correct 0 ms 208 KB Partially correct
7 Partially correct 0 ms 208 KB Partially correct
8 Partially correct 0 ms 208 KB Partially correct
9 Partially correct 0 ms 208 KB Partially correct
10 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
11 Partially correct 1 ms 336 KB Partially correct
12 Partially correct 1 ms 336 KB Partially correct
13 Partially correct 1 ms 344 KB Partially correct
14 Partially correct 1 ms 336 KB Partially correct
15 Partially correct 1 ms 336 KB Partially correct
16 Partially correct 9 ms 696 KB Partially correct
17 Partially correct 7 ms 636 KB Partially correct
18 Partially correct 7 ms 592 KB Partially correct
19 Partially correct 7 ms 640 KB Partially correct
20 Runtime error 8 ms 704 KB Execution failed because the return code was nonzero
21 Incorrect 28 ms 1840 KB Expected int32, but "2500100001" found
22 Incorrect 29 ms 1856 KB Expected int32, but "2500100001" found
23 Incorrect 35 ms 1828 KB Expected int32, but "2500100001" found
24 Incorrect 30 ms 1824 KB Expected int32, but "2500100001" found
25 Incorrect 27 ms 1872 KB Expected int32, but "2500100001" found
26 Incorrect 30 ms 1832 KB Expected int32, but "2500100001" found
27 Incorrect 32 ms 1952 KB Expected int32, but "2500100001" found
28 Incorrect 35 ms 1824 KB Expected int32, but "2500100001" found
29 Incorrect 39 ms 1864 KB Expected int32, but "2500100001" found
30 Runtime error 24 ms 1868 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
32 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero