답안 #773891

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


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

	MinMax(0LL,LLONG_MAX, &mn, &mx);
	a[1] = mn; a[N] = mx;
	i = 1; j = N;
	
	while ( mn != -1 && mx != -1 && mx > mn) {
		long long d, b;
		MinMax(mn+1, mx-1, &d, &b);
		mn = d, mx = b;
		i ++; j --;
		if ( mn == -1 ) break;
		a[i] = mn; a[j] = mx;
	}

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

	return diff;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Output isn't correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 0 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 0 ms 208 KB Output is correct
6 Incorrect 0 ms 208 KB Output isn't correct
7 Incorrect 0 ms 208 KB Output isn't correct
8 Incorrect 0 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 7 ms 624 KB Output isn't correct
17 Incorrect 9 ms 704 KB Output isn't correct
18 Incorrect 9 ms 712 KB Output isn't correct
19 Incorrect 10 ms 712 KB Output isn't correct
20 Runtime error 6 ms 704 KB Execution failed because the return code was nonzero
21 Incorrect 29 ms 1892 KB Output isn't correct
22 Incorrect 28 ms 1736 KB Output isn't correct
23 Incorrect 31 ms 1856 KB Output isn't correct
24 Incorrect 29 ms 1744 KB Output isn't correct
25 Incorrect 27 ms 1740 KB Output isn't correct
26 Incorrect 28 ms 1824 KB Output isn't correct
27 Incorrect 28 ms 1784 KB Output isn't correct
28 Incorrect 31 ms 1824 KB Output isn't correct
29 Incorrect 34 ms 1852 KB Output isn't correct
30 Runtime error 23 ms 1884 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 0 ms 208 KB Output is correct
2 Partially correct 0 ms 208 KB Partially correct
3 Partially correct 0 ms 208 KB Partially correct
4 Partially correct 0 ms 208 KB Partially correct
5 Partially correct 0 ms 208 KB Partially correct
6 Partially correct 1 ms 248 KB Partially correct
7 Partially correct 0 ms 208 KB Partially correct
8 Partially correct 0 ms 208 KB Partially correct
9 Partially correct 1 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 336 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 704 KB Partially correct
17 Partially correct 8 ms 624 KB Partially correct
18 Partially correct 7 ms 584 KB Partially correct
19 Partially correct 7 ms 592 KB Partially correct
20 Runtime error 6 ms 592 KB Execution failed because the return code was nonzero
21 Incorrect 28 ms 1840 KB Expected int32, but "2500100001" found
22 Incorrect 29 ms 1864 KB Expected int32, but "2500100001" found
23 Incorrect 29 ms 1860 KB Expected int32, but "2500100001" found
24 Incorrect 33 ms 1872 KB Expected int32, but "2500100001" found
25 Incorrect 32 ms 1856 KB Expected int32, but "2500100001" found
26 Incorrect 29 ms 1796 KB Expected int32, but "2500100001" found
27 Incorrect 34 ms 1872 KB Expected int32, but "2500100001" found
28 Incorrect 29 ms 1736 KB Expected int32, but "2500100001" found
29 Incorrect 30 ms 1860 KB Expected int32, but "2500100001" found
30 Runtime error 23 ms 1876 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