답안 #61076

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
61076 2018-07-25T07:42:06 Z Eae02 Gap (APIO16_gap) C++14
30 / 100
88 ms 40044 KB
#include "gap.h"

#include <bits/stdc++.h>

using ll = long long;

long long findGap(int T, int N)
{
	ll min = 0;
	ll max = 1000000000000000000;
	
	std::vector<ll> numbers(N);
	for (int i = 0; 2 * i < N; i++)
	{
		ll nextMin, nextMax;
		MinMax(min, max, &nextMin, &nextMax);
		
		numbers[i] = nextMin;
		numbers[numbers.size() - i - 1] = nextMax;
		
		min = nextMin + 1;
		max = nextMax - 1;
	}
	
	ll maxDiff = 0;
	for (int i = 1; i < N; i++)
	{
		maxDiff = std::max(maxDiff, numbers[i] - numbers[i - 1]);
	}
	
	return maxDiff;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 3 ms 496 KB Output is correct
3 Correct 4 ms 676 KB Output is correct
4 Correct 2 ms 676 KB Output is correct
5 Correct 2 ms 676 KB Output is correct
6 Correct 3 ms 676 KB Output is correct
7 Correct 3 ms 676 KB Output is correct
8 Correct 3 ms 676 KB Output is correct
9 Correct 5 ms 692 KB Output is correct
10 Correct 5 ms 696 KB Output is correct
11 Correct 4 ms 700 KB Output is correct
12 Correct 3 ms 728 KB Output is correct
13 Correct 4 ms 828 KB Output is correct
14 Correct 5 ms 944 KB Output is correct
15 Correct 3 ms 944 KB Output is correct
16 Correct 19 ms 1644 KB Output is correct
17 Correct 20 ms 2108 KB Output is correct
18 Correct 20 ms 2572 KB Output is correct
19 Correct 20 ms 3036 KB Output is correct
20 Correct 16 ms 3244 KB Output is correct
21 Correct 72 ms 6400 KB Output is correct
22 Correct 66 ms 8132 KB Output is correct
23 Correct 87 ms 10052 KB Output is correct
24 Correct 88 ms 11820 KB Output is correct
25 Correct 59 ms 13040 KB Output is correct
26 Correct 64 ms 14908 KB Output is correct
27 Correct 72 ms 16752 KB Output is correct
28 Correct 66 ms 18612 KB Output is correct
29 Correct 76 ms 20428 KB Output is correct
30 Correct 52 ms 21136 KB Output is correct
31 Correct 5 ms 21136 KB Output is correct
32 Correct 4 ms 21136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 21136 KB Output is correct
2 Partially correct 4 ms 21136 KB Partially correct
3 Partially correct 3 ms 21136 KB Partially correct
4 Partially correct 3 ms 21136 KB Partially correct
5 Partially correct 2 ms 21136 KB Partially correct
6 Partially correct 2 ms 21136 KB Partially correct
7 Partially correct 3 ms 21136 KB Partially correct
8 Partially correct 3 ms 21136 KB Partially correct
9 Partially correct 3 ms 21136 KB Partially correct
10 Partially correct 3 ms 21136 KB Partially correct
11 Partially correct 4 ms 21136 KB Partially correct
12 Partially correct 4 ms 21136 KB Partially correct
13 Partially correct 4 ms 21136 KB Partially correct
14 Partially correct 4 ms 21136 KB Partially correct
15 Partially correct 4 ms 21136 KB Partially correct
16 Partially correct 24 ms 21136 KB Partially correct
17 Partially correct 18 ms 21136 KB Partially correct
18 Partially correct 20 ms 21528 KB Partially correct
19 Partially correct 18 ms 21980 KB Partially correct
20 Partially correct 13 ms 22188 KB Partially correct
21 Incorrect 66 ms 25160 KB Expected int32, but "2500100000" found
22 Incorrect 66 ms 27004 KB Expected int32, but "2500100000" found
23 Incorrect 61 ms 28980 KB Expected int32, but "2500100000" found
24 Incorrect 68 ms 30700 KB Expected int32, but "2500100000" found
25 Incorrect 57 ms 32028 KB Expected int32, but "2500100000" found
26 Incorrect 88 ms 33788 KB Expected int32, but "2500100000" found
27 Incorrect 68 ms 35640 KB Expected int32, but "2500100000" found
28 Incorrect 73 ms 37512 KB Expected int32, but "2500100000" found
29 Incorrect 79 ms 39336 KB Expected int32, but "2500100000" found
30 Incorrect 54 ms 40044 KB Expected int32, but "2500100000" found
31 Partially correct 3 ms 40044 KB Partially correct
32 Partially correct 2 ms 40044 KB Partially correct