답안 #63790

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
63790 2018-08-02T20:40:28 Z kingpig9 Gap (APIO16_gap) C++11
30 / 100
81 ms 9464 KB
#include <bits/stdc++.h>
#include "gap.h"

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5 + 10;

#define debug(...) fprintf(stderr, __VA_ARGS__)
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define fillchar(a, s) memset((a), (s), sizeof(a))

int N;
ll A[MAXN];

ll findGap (int subtask, int nnn) {
	N = nnn;
	for (int i = 1, j = N; i <= j; i++, j--) {
		ll mn, mx;
		if (i == 1) {
			mn = 0;
			mx = 1e18;
		} else {
			mn = A[i - 1] + 1;
			mx = A[j + 1] - 1;
		}
		MinMax(mn, mx, &mn, &mx);
		A[i] = mn;
		A[j] = mx;
	}

	ll ans = 0;
	for (int i = 2; i <= N; i++) {
		ans = max(ans, A[i] - A[i - 1]);
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 3 ms 376 KB Output is correct
3 Correct 2 ms 444 KB Output is correct
4 Correct 3 ms 632 KB Output is correct
5 Correct 4 ms 632 KB Output is correct
6 Correct 3 ms 636 KB Output is correct
7 Correct 3 ms 648 KB Output is correct
8 Correct 3 ms 648 KB Output is correct
9 Correct 3 ms 744 KB Output is correct
10 Correct 4 ms 744 KB Output is correct
11 Correct 4 ms 744 KB Output is correct
12 Correct 5 ms 744 KB Output is correct
13 Correct 4 ms 744 KB Output is correct
14 Correct 4 ms 744 KB Output is correct
15 Correct 3 ms 772 KB Output is correct
16 Correct 18 ms 1628 KB Output is correct
17 Correct 18 ms 2008 KB Output is correct
18 Correct 17 ms 2468 KB Output is correct
19 Correct 24 ms 2932 KB Output is correct
20 Correct 14 ms 3140 KB Output is correct
21 Correct 67 ms 6112 KB Output is correct
22 Correct 65 ms 7956 KB Output is correct
23 Correct 81 ms 9288 KB Output is correct
24 Correct 68 ms 9356 KB Output is correct
25 Correct 60 ms 9356 KB Output is correct
26 Correct 72 ms 9356 KB Output is correct
27 Correct 60 ms 9356 KB Output is correct
28 Correct 65 ms 9356 KB Output is correct
29 Correct 79 ms 9360 KB Output is correct
30 Correct 46 ms 9360 KB Output is correct
31 Correct 3 ms 9360 KB Output is correct
32 Correct 3 ms 9360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9360 KB Output is correct
2 Partially correct 2 ms 9360 KB Partially correct
3 Partially correct 4 ms 9360 KB Partially correct
4 Partially correct 2 ms 9360 KB Partially correct
5 Partially correct 3 ms 9360 KB Partially correct
6 Partially correct 4 ms 9360 KB Partially correct
7 Partially correct 3 ms 9360 KB Partially correct
8 Partially correct 3 ms 9360 KB Partially correct
9 Partially correct 3 ms 9360 KB Partially correct
10 Partially correct 3 ms 9360 KB Partially correct
11 Partially correct 3 ms 9360 KB Partially correct
12 Partially correct 4 ms 9360 KB Partially correct
13 Partially correct 4 ms 9360 KB Partially correct
14 Partially correct 3 ms 9360 KB Partially correct
15 Partially correct 3 ms 9360 KB Partially correct
16 Partially correct 17 ms 9360 KB Partially correct
17 Partially correct 24 ms 9360 KB Partially correct
18 Partially correct 19 ms 9360 KB Partially correct
19 Partially correct 18 ms 9360 KB Partially correct
20 Partially correct 15 ms 9360 KB Partially correct
21 Incorrect 60 ms 9372 KB Expected int32, but "2500100000" found
22 Incorrect 65 ms 9376 KB Expected int32, but "2500100000" found
23 Incorrect 61 ms 9464 KB Expected int32, but "2500100000" found
24 Incorrect 59 ms 9464 KB Expected int32, but "2500100000" found
25 Incorrect 55 ms 9464 KB Expected int32, but "2500100000" found
26 Incorrect 62 ms 9464 KB Expected int32, but "2500100000" found
27 Incorrect 63 ms 9464 KB Expected int32, but "2500100000" found
28 Incorrect 60 ms 9464 KB Expected int32, but "2500100000" found
29 Incorrect 63 ms 9464 KB Expected int32, but "2500100000" found
30 Incorrect 60 ms 9464 KB Expected int32, but "2500100000" found
31 Partially correct 3 ms 9464 KB Partially correct
32 Partially correct 3 ms 9464 KB Partially correct