답안 #590172

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
590172 2022-07-05T15:40:34 Z rainboy Uplifting Excursion (BOI22_vault) C
50 / 100
3743 ms 17868 KB
#include <stdio.h>
#include <string.h>

#define N	100
#define S	(N * N * N)
#define N3	30
#define S_	(N3 * N3)
#define INF	0x3f3f3f3f

long long min(long long a, long long b) { return a < b ? a : b; }
long long max(long long a, long long b) { return a > b ? a : b; }

void update(int *dp, int s_,int a, int k, int c) {
	static int dq[S * 2 + 1], qu[S * 2 + 1];
	int s, r, head, cnt;

	if (a > 0) {
		for (s = 0; s <= s_; s++)
			dq[s] = dp[s] == -INF ? -INF : dp[s] - s / a * c;
		for (r = 0; r < a; r++) {
			head = cnt = 0;
			for (s = r; s <= s_; s += a) {
				if (dq[s] != -INF) {
					while (cnt && dq[qu[head + cnt - 1]] < dq[s])
						cnt--;
					qu[head + cnt++] = s;
				}
				dp[s] = cnt == 0 ? -INF : dq[qu[head]] + s / a * c;
				if (cnt && qu[head] == s - a * k)
					head++, cnt--;
			}
		}
	} else if (a < 0) {
		a = -a;
		for (s = 0; s <= s_; s++)
			dq[s] = dp[s] == -INF ? -INF : dp[s] + s / a * c;
		for (r = 0; r < a; r++) {
			head = cnt = 0;
			for (s = (s_ - r) / a * a + r; s >= 0; s -= a) {
				if (dq[s] != -INF) {
					while (cnt && dq[qu[head + cnt - 1]] < dq[s])
						cnt--;
					qu[head + cnt++] = s;
				}
				dp[s] = cnt == 0 ? -INF : dq[qu[head]] - s / a * c;
				if (cnt && qu[head] == s + a * k)
					head++, cnt--;
			}
		}
	} else {
		if (c <= 0)
			return;
		for (s = 0; s <= s_; s++)
			if (dp[s] != -INF)
				dp[s] += k * c;
	}
}

long long solve(long long *kk, int n, long long s_) {
	static int dp[S_ * 2 + 1], dq[N + 1][S_ + 1];
	int a, s1, s2;
	long long s, s0, k, k0, ans;

	for (s = 0; s <= S_; s++)
		dp[s] = -INF;
	dp[0] = 0;
	for (a = n; a >= 0; a--) {
		memcpy(dq[a], dp, (S_ + 1) * sizeof *dp);
		update(dp, S_, a, min(kk[a + n], n), 1);
	}
	for (s = 0; s <= S_ * 2; s++)
		dp[s] = -INF;
	dp[S_ + 0] = 0;
	s0 = 0, k0 = 0;
	for (a = -n; a < 0; a++) {
		update(dp, S_ * 2, a, min(kk[a + n], n), -1);
		s0 += kk[a + n] * a, k0 += kk[a + n];
	}
	ans = -INF;
	for (a = 0; a <= n; a++) {
		for (s1 = 0; s1 <= S_ * 2; s1++)
			if (dp[s1] != -INF)
				for (s2 = 0; s2 <= S_; s2++)
					if (dq[a][s2] != -INF) {
						s = s0 - (s1 - S_) + s2;
						if (a == 0) {
							if (s == s_)
								ans = max(ans, k0 + dp[s1] + dq[a][s2] + kk[a + n]);
						} else {
							if (s <= s_ && (s_ - s) % a == 0 && (k = (s_ - s) / a) <= kk[a + n])
								ans = max(ans, k0 + dp[s1] + dq[a][s2] + k);
						}
					}
		update(dp, S_ * 2, a, min(kk[a + n], n), -1);
		s0 += kk[a + n] * a, k0 += kk[a + n];
	}
	return ans;
}

int main() {
	static long long kk[N * 2 + 1];
	static int dp[S * 2 + 1], dq[N][S_ + 1];
	int n, a, r, s1, s2, subtask2;
	long long s, s_, s0, k0, k, ans, tmp;

	scanf("%d%lld", &n, &s_);
	subtask2 = n <= N;
	for (a = -n; a <= n; a++) {
		scanf("%lld", &kk[a + n]);
		if (kk[a + n] > N)
			subtask2 = 0;
	}
	if (subtask2) {
		if (s_ < -S || s_ > S) {
			printf("impossible\n");
			return 0;
		}
		for (s = 0; s <= S * 2; s++)
			dp[s] = -INF;
		dp[S + 0] = 0;
		for (a = -n; a <= n; a++)
			update(dp, S * 2, a, kk[a + n], 1);
		if (dp[S + s_] == -INF)
			printf("impossible\n");
		else
			printf("%d\n", dp[S + s_]);
	} else if (n <= N3) {
		ans = -INF;
		for (r = 0; r < 2; r++) {
			ans = max(ans, solve(kk, n, s_));
			s_ = -s_;
			for (a = 1; a <= n; a++)
				tmp = kk[n - a], kk[n - a] = kk[n + a], kk[n + a] = tmp;
		}
		if (ans == -INF)
			printf("impossible\n");
		else
			printf("%lld\n", ans);
	} else {
		for (s = 0; s <= S_; s++)
			dp[s] = -INF;
		dp[0] = 0;
		for (a = n; a >= 0; a--) {
			memcpy(dq[a], dp, (S_ + 1) * sizeof *dp);
			update(dp, S_, a, min(kk[a + n], n), 1);
		}
		for (s = 0; s <= S_; s++)
			dp[s] = -INF;
		dp[0] = 0;
		ans = -INF, s0 = 0, k0 = 0;
		for (a = 0; a <= n; a++) {
			for (s1 = 0; s1 <= S_; s1++)
				if (dp[s1] != -INF)
					for (s2 = 0; s2 <= S_; s2++)
						if (dq[a][s2] != -INF) {
							s = s0 - s1 + s2;
							if (a == 0) {
								if (s == s_)
									ans = max(ans, k0 + dp[s1] + dq[a][s2] + kk[a + n]);
							} else {
								if (s <= s_ && (s_ - s) % a == 0 && (k = (s_ - s) / a) <= kk[a + n])
									ans = max(ans, k0 + dp[s1] + dq[a][s2] + k);
							}
						}
			update(dp, S_, a, min(kk[a + n], n), -1);
			s0 += kk[a + n] * a, k0 += kk[a + n];
		}
		if (ans == -INF)
			printf("impossible\n");
		else
			printf("%lld\n", ans);
	}
	return 0;
}

Compilation message

vault.c: In function 'main':
vault.c:106:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  106 |  scanf("%d%lld", &n, &s_);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
vault.c:109:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  109 |   scanf("%lld", &kk[a + n]);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15828 KB Output is correct
2 Correct 34 ms 15828 KB Output is correct
3 Correct 15 ms 15956 KB Output is correct
4 Correct 161 ms 15924 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1784 ms 16064 KB Output is correct
7 Correct 1961 ms 15972 KB Output is correct
8 Correct 1771 ms 16056 KB Output is correct
9 Correct 1892 ms 16200 KB Output is correct
10 Correct 1759 ms 15928 KB Output is correct
11 Correct 1638 ms 15932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15828 KB Output is correct
2 Correct 34 ms 15828 KB Output is correct
3 Correct 15 ms 15956 KB Output is correct
4 Correct 161 ms 15924 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1784 ms 16064 KB Output is correct
7 Correct 1961 ms 15972 KB Output is correct
8 Correct 1771 ms 16056 KB Output is correct
9 Correct 1892 ms 16200 KB Output is correct
10 Correct 1759 ms 15928 KB Output is correct
11 Correct 1638 ms 15932 KB Output is correct
12 Correct 24 ms 15956 KB Output is correct
13 Correct 36 ms 15896 KB Output is correct
14 Correct 19 ms 15952 KB Output is correct
15 Correct 165 ms 15928 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1975 ms 16060 KB Output is correct
18 Correct 1875 ms 15936 KB Output is correct
19 Correct 1969 ms 16052 KB Output is correct
20 Correct 1970 ms 16064 KB Output is correct
21 Correct 1793 ms 15932 KB Output is correct
22 Correct 1768 ms 15932 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 3331 ms 17020 KB Output is correct
25 Correct 2942 ms 16372 KB Output is correct
26 Correct 3743 ms 17868 KB Output is correct
27 Correct 3519 ms 17852 KB Output is correct
28 Correct 2538 ms 15932 KB Output is correct
29 Correct 2485 ms 15828 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 15828 KB Output is correct
2 Correct 202 ms 416 KB Output is correct
3 Correct 95 ms 416 KB Output is correct
4 Correct 101 ms 424 KB Output is correct
5 Correct 211 ms 340 KB Output is correct
6 Correct 41 ms 340 KB Output is correct
7 Correct 9 ms 340 KB Output is correct
8 Correct 13 ms 432 KB Output is correct
9 Correct 70 ms 340 KB Output is correct
10 Correct 127 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 15828 KB Output is correct
2 Correct 202 ms 416 KB Output is correct
3 Correct 95 ms 416 KB Output is correct
4 Correct 101 ms 424 KB Output is correct
5 Correct 211 ms 340 KB Output is correct
6 Correct 41 ms 340 KB Output is correct
7 Correct 9 ms 340 KB Output is correct
8 Correct 13 ms 432 KB Output is correct
9 Correct 70 ms 340 KB Output is correct
10 Correct 127 ms 340 KB Output is correct
11 Correct 25 ms 15828 KB Output is correct
12 Correct 41 ms 15920 KB Output is correct
13 Correct 16 ms 15952 KB Output is correct
14 Correct 163 ms 15856 KB Output is correct
15 Correct 203 ms 416 KB Output is correct
16 Correct 96 ms 416 KB Output is correct
17 Correct 111 ms 416 KB Output is correct
18 Correct 212 ms 416 KB Output is correct
19 Correct 40 ms 340 KB Output is correct
20 Correct 9 ms 432 KB Output is correct
21 Correct 14 ms 432 KB Output is correct
22 Correct 69 ms 340 KB Output is correct
23 Correct 136 ms 464 KB Output is correct
24 Correct 893 ms 412 KB Output is correct
25 Correct 377 ms 460 KB Output is correct
26 Correct 568 ms 340 KB Output is correct
27 Correct 861 ms 416 KB Output is correct
28 Correct 528 ms 416 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 15828 KB Output is correct
2 Correct 202 ms 416 KB Output is correct
3 Correct 95 ms 416 KB Output is correct
4 Correct 101 ms 424 KB Output is correct
5 Correct 211 ms 340 KB Output is correct
6 Correct 41 ms 340 KB Output is correct
7 Correct 9 ms 340 KB Output is correct
8 Correct 13 ms 432 KB Output is correct
9 Correct 70 ms 340 KB Output is correct
10 Correct 127 ms 340 KB Output is correct
11 Correct 161 ms 15936 KB Output is correct
12 Correct 200 ms 412 KB Output is correct
13 Correct 96 ms 416 KB Output is correct
14 Correct 100 ms 340 KB Output is correct
15 Correct 210 ms 424 KB Output is correct
16 Correct 41 ms 340 KB Output is correct
17 Correct 9 ms 428 KB Output is correct
18 Correct 14 ms 340 KB Output is correct
19 Correct 78 ms 416 KB Output is correct
20 Correct 130 ms 416 KB Output is correct
21 Correct 1705 ms 15948 KB Output is correct
22 Correct 1610 ms 15932 KB Output is correct
23 Correct 365 ms 476 KB Output is correct
24 Correct 293 ms 496 KB Output is correct
25 Correct 359 ms 492 KB Output is correct
26 Correct 213 ms 488 KB Output is correct
27 Correct 39 ms 468 KB Output is correct
28 Correct 268 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15828 KB Output is correct
2 Correct 34 ms 15828 KB Output is correct
3 Correct 15 ms 15956 KB Output is correct
4 Correct 161 ms 15924 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1784 ms 16064 KB Output is correct
7 Correct 1961 ms 15972 KB Output is correct
8 Correct 1771 ms 16056 KB Output is correct
9 Correct 1892 ms 16200 KB Output is correct
10 Correct 1759 ms 15928 KB Output is correct
11 Correct 1638 ms 15932 KB Output is correct
12 Correct 174 ms 15828 KB Output is correct
13 Correct 202 ms 416 KB Output is correct
14 Correct 95 ms 416 KB Output is correct
15 Correct 101 ms 424 KB Output is correct
16 Correct 211 ms 340 KB Output is correct
17 Correct 41 ms 340 KB Output is correct
18 Correct 9 ms 340 KB Output is correct
19 Correct 13 ms 432 KB Output is correct
20 Correct 70 ms 340 KB Output is correct
21 Correct 127 ms 340 KB Output is correct
22 Correct 25 ms 15828 KB Output is correct
23 Correct 41 ms 15920 KB Output is correct
24 Correct 16 ms 15952 KB Output is correct
25 Correct 163 ms 15856 KB Output is correct
26 Correct 203 ms 416 KB Output is correct
27 Correct 96 ms 416 KB Output is correct
28 Correct 111 ms 416 KB Output is correct
29 Correct 212 ms 416 KB Output is correct
30 Correct 40 ms 340 KB Output is correct
31 Correct 9 ms 432 KB Output is correct
32 Correct 14 ms 432 KB Output is correct
33 Correct 69 ms 340 KB Output is correct
34 Correct 136 ms 464 KB Output is correct
35 Correct 893 ms 412 KB Output is correct
36 Correct 377 ms 460 KB Output is correct
37 Correct 568 ms 340 KB Output is correct
38 Correct 861 ms 416 KB Output is correct
39 Correct 528 ms 416 KB Output is correct
40 Correct 161 ms 15936 KB Output is correct
41 Correct 200 ms 412 KB Output is correct
42 Correct 96 ms 416 KB Output is correct
43 Correct 100 ms 340 KB Output is correct
44 Correct 210 ms 424 KB Output is correct
45 Correct 41 ms 340 KB Output is correct
46 Correct 9 ms 428 KB Output is correct
47 Correct 14 ms 340 KB Output is correct
48 Correct 78 ms 416 KB Output is correct
49 Correct 130 ms 416 KB Output is correct
50 Correct 1705 ms 15948 KB Output is correct
51 Correct 1610 ms 15932 KB Output is correct
52 Correct 365 ms 476 KB Output is correct
53 Correct 293 ms 496 KB Output is correct
54 Correct 359 ms 492 KB Output is correct
55 Correct 213 ms 488 KB Output is correct
56 Correct 39 ms 468 KB Output is correct
57 Correct 268 ms 468 KB Output is correct
58 Correct 24 ms 15948 KB Output is correct
59 Correct 33 ms 15828 KB Output is correct
60 Correct 15 ms 15952 KB Output is correct
61 Correct 169 ms 15944 KB Output is correct
62 Correct 0 ms 212 KB Output is correct
63 Correct 1894 ms 16060 KB Output is correct
64 Correct 1645 ms 15976 KB Output is correct
65 Correct 1822 ms 16048 KB Output is correct
66 Correct 1800 ms 16168 KB Output is correct
67 Correct 1655 ms 15932 KB Output is correct
68 Correct 1736 ms 15940 KB Output is correct
69 Correct 201 ms 420 KB Output is correct
70 Correct 96 ms 416 KB Output is correct
71 Correct 102 ms 340 KB Output is correct
72 Correct 214 ms 420 KB Output is correct
73 Correct 41 ms 340 KB Output is correct
74 Correct 9 ms 340 KB Output is correct
75 Correct 14 ms 432 KB Output is correct
76 Correct 70 ms 416 KB Output is correct
77 Correct 129 ms 420 KB Output is correct
78 Correct 883 ms 416 KB Output is correct
79 Correct 381 ms 416 KB Output is correct
80 Correct 574 ms 340 KB Output is correct
81 Correct 857 ms 420 KB Output is correct
82 Correct 529 ms 416 KB Output is correct
83 Correct 370 ms 480 KB Output is correct
84 Correct 292 ms 484 KB Output is correct
85 Correct 361 ms 588 KB Output is correct
86 Correct 217 ms 484 KB Output is correct
87 Correct 40 ms 468 KB Output is correct
88 Correct 268 ms 484 KB Output is correct
89 Incorrect 40 ms 468 KB Output isn't correct
90 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 15828 KB Output is correct
2 Correct 202 ms 416 KB Output is correct
3 Correct 95 ms 416 KB Output is correct
4 Correct 101 ms 424 KB Output is correct
5 Correct 211 ms 340 KB Output is correct
6 Correct 41 ms 340 KB Output is correct
7 Correct 9 ms 340 KB Output is correct
8 Correct 13 ms 432 KB Output is correct
9 Correct 70 ms 340 KB Output is correct
10 Correct 127 ms 340 KB Output is correct
11 Correct 161 ms 15936 KB Output is correct
12 Correct 200 ms 412 KB Output is correct
13 Correct 96 ms 416 KB Output is correct
14 Correct 100 ms 340 KB Output is correct
15 Correct 210 ms 424 KB Output is correct
16 Correct 41 ms 340 KB Output is correct
17 Correct 9 ms 428 KB Output is correct
18 Correct 14 ms 340 KB Output is correct
19 Correct 78 ms 416 KB Output is correct
20 Correct 130 ms 416 KB Output is correct
21 Correct 1705 ms 15948 KB Output is correct
22 Correct 1610 ms 15932 KB Output is correct
23 Correct 365 ms 476 KB Output is correct
24 Correct 293 ms 496 KB Output is correct
25 Correct 359 ms 492 KB Output is correct
26 Correct 213 ms 488 KB Output is correct
27 Correct 39 ms 468 KB Output is correct
28 Correct 268 ms 468 KB Output is correct
29 Correct 159 ms 15940 KB Output is correct
30 Correct 202 ms 420 KB Output is correct
31 Correct 96 ms 412 KB Output is correct
32 Correct 102 ms 340 KB Output is correct
33 Correct 209 ms 420 KB Output is correct
34 Correct 40 ms 412 KB Output is correct
35 Correct 10 ms 340 KB Output is correct
36 Correct 14 ms 340 KB Output is correct
37 Correct 69 ms 420 KB Output is correct
38 Correct 129 ms 416 KB Output is correct
39 Correct 1685 ms 15932 KB Output is correct
40 Correct 1635 ms 15928 KB Output is correct
41 Correct 368 ms 484 KB Output is correct
42 Correct 293 ms 484 KB Output is correct
43 Correct 359 ms 484 KB Output is correct
44 Correct 225 ms 588 KB Output is correct
45 Correct 40 ms 468 KB Output is correct
46 Correct 273 ms 484 KB Output is correct
47 Correct 2565 ms 15928 KB Output is correct
48 Correct 2557 ms 15932 KB Output is correct
49 Correct 51 ms 656 KB Output is correct
50 Incorrect 36 ms 596 KB Output isn't correct
51 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15828 KB Output is correct
2 Correct 34 ms 15828 KB Output is correct
3 Correct 15 ms 15956 KB Output is correct
4 Correct 161 ms 15924 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1784 ms 16064 KB Output is correct
7 Correct 1961 ms 15972 KB Output is correct
8 Correct 1771 ms 16056 KB Output is correct
9 Correct 1892 ms 16200 KB Output is correct
10 Correct 1759 ms 15928 KB Output is correct
11 Correct 1638 ms 15932 KB Output is correct
12 Correct 24 ms 15956 KB Output is correct
13 Correct 36 ms 15896 KB Output is correct
14 Correct 19 ms 15952 KB Output is correct
15 Correct 165 ms 15928 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1975 ms 16060 KB Output is correct
18 Correct 1875 ms 15936 KB Output is correct
19 Correct 1969 ms 16052 KB Output is correct
20 Correct 1970 ms 16064 KB Output is correct
21 Correct 1793 ms 15932 KB Output is correct
22 Correct 1768 ms 15932 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 3331 ms 17020 KB Output is correct
25 Correct 2942 ms 16372 KB Output is correct
26 Correct 3743 ms 17868 KB Output is correct
27 Correct 3519 ms 17852 KB Output is correct
28 Correct 2538 ms 15932 KB Output is correct
29 Correct 2485 ms 15828 KB Output is correct
30 Correct 174 ms 15828 KB Output is correct
31 Correct 202 ms 416 KB Output is correct
32 Correct 95 ms 416 KB Output is correct
33 Correct 101 ms 424 KB Output is correct
34 Correct 211 ms 340 KB Output is correct
35 Correct 41 ms 340 KB Output is correct
36 Correct 9 ms 340 KB Output is correct
37 Correct 13 ms 432 KB Output is correct
38 Correct 70 ms 340 KB Output is correct
39 Correct 127 ms 340 KB Output is correct
40 Correct 25 ms 15828 KB Output is correct
41 Correct 41 ms 15920 KB Output is correct
42 Correct 16 ms 15952 KB Output is correct
43 Correct 163 ms 15856 KB Output is correct
44 Correct 203 ms 416 KB Output is correct
45 Correct 96 ms 416 KB Output is correct
46 Correct 111 ms 416 KB Output is correct
47 Correct 212 ms 416 KB Output is correct
48 Correct 40 ms 340 KB Output is correct
49 Correct 9 ms 432 KB Output is correct
50 Correct 14 ms 432 KB Output is correct
51 Correct 69 ms 340 KB Output is correct
52 Correct 136 ms 464 KB Output is correct
53 Correct 893 ms 412 KB Output is correct
54 Correct 377 ms 460 KB Output is correct
55 Correct 568 ms 340 KB Output is correct
56 Correct 861 ms 416 KB Output is correct
57 Correct 528 ms 416 KB Output is correct
58 Correct 161 ms 15936 KB Output is correct
59 Correct 200 ms 412 KB Output is correct
60 Correct 96 ms 416 KB Output is correct
61 Correct 100 ms 340 KB Output is correct
62 Correct 210 ms 424 KB Output is correct
63 Correct 41 ms 340 KB Output is correct
64 Correct 9 ms 428 KB Output is correct
65 Correct 14 ms 340 KB Output is correct
66 Correct 78 ms 416 KB Output is correct
67 Correct 130 ms 416 KB Output is correct
68 Correct 1705 ms 15948 KB Output is correct
69 Correct 1610 ms 15932 KB Output is correct
70 Correct 365 ms 476 KB Output is correct
71 Correct 293 ms 496 KB Output is correct
72 Correct 359 ms 492 KB Output is correct
73 Correct 213 ms 488 KB Output is correct
74 Correct 39 ms 468 KB Output is correct
75 Correct 268 ms 468 KB Output is correct
76 Correct 24 ms 15948 KB Output is correct
77 Correct 33 ms 15828 KB Output is correct
78 Correct 15 ms 15952 KB Output is correct
79 Correct 169 ms 15944 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 1894 ms 16060 KB Output is correct
82 Correct 1645 ms 15976 KB Output is correct
83 Correct 1822 ms 16048 KB Output is correct
84 Correct 1800 ms 16168 KB Output is correct
85 Correct 1655 ms 15932 KB Output is correct
86 Correct 1736 ms 15940 KB Output is correct
87 Correct 201 ms 420 KB Output is correct
88 Correct 96 ms 416 KB Output is correct
89 Correct 102 ms 340 KB Output is correct
90 Correct 214 ms 420 KB Output is correct
91 Correct 41 ms 340 KB Output is correct
92 Correct 9 ms 340 KB Output is correct
93 Correct 14 ms 432 KB Output is correct
94 Correct 70 ms 416 KB Output is correct
95 Correct 129 ms 420 KB Output is correct
96 Correct 883 ms 416 KB Output is correct
97 Correct 381 ms 416 KB Output is correct
98 Correct 574 ms 340 KB Output is correct
99 Correct 857 ms 420 KB Output is correct
100 Correct 529 ms 416 KB Output is correct
101 Correct 370 ms 480 KB Output is correct
102 Correct 292 ms 484 KB Output is correct
103 Correct 361 ms 588 KB Output is correct
104 Correct 217 ms 484 KB Output is correct
105 Correct 40 ms 468 KB Output is correct
106 Correct 268 ms 484 KB Output is correct
107 Incorrect 40 ms 468 KB Output isn't correct
108 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 15828 KB Output is correct
2 Correct 202 ms 416 KB Output is correct
3 Correct 95 ms 416 KB Output is correct
4 Correct 101 ms 424 KB Output is correct
5 Correct 211 ms 340 KB Output is correct
6 Correct 41 ms 340 KB Output is correct
7 Correct 9 ms 340 KB Output is correct
8 Correct 13 ms 432 KB Output is correct
9 Correct 70 ms 340 KB Output is correct
10 Correct 127 ms 340 KB Output is correct
11 Correct 161 ms 15936 KB Output is correct
12 Correct 200 ms 412 KB Output is correct
13 Correct 96 ms 416 KB Output is correct
14 Correct 100 ms 340 KB Output is correct
15 Correct 210 ms 424 KB Output is correct
16 Correct 41 ms 340 KB Output is correct
17 Correct 9 ms 428 KB Output is correct
18 Correct 14 ms 340 KB Output is correct
19 Correct 78 ms 416 KB Output is correct
20 Correct 130 ms 416 KB Output is correct
21 Correct 1705 ms 15948 KB Output is correct
22 Correct 1610 ms 15932 KB Output is correct
23 Correct 365 ms 476 KB Output is correct
24 Correct 293 ms 496 KB Output is correct
25 Correct 359 ms 492 KB Output is correct
26 Correct 213 ms 488 KB Output is correct
27 Correct 39 ms 468 KB Output is correct
28 Correct 268 ms 468 KB Output is correct
29 Correct 159 ms 15940 KB Output is correct
30 Correct 202 ms 420 KB Output is correct
31 Correct 96 ms 412 KB Output is correct
32 Correct 102 ms 340 KB Output is correct
33 Correct 209 ms 420 KB Output is correct
34 Correct 40 ms 412 KB Output is correct
35 Correct 10 ms 340 KB Output is correct
36 Correct 14 ms 340 KB Output is correct
37 Correct 69 ms 420 KB Output is correct
38 Correct 129 ms 416 KB Output is correct
39 Correct 1685 ms 15932 KB Output is correct
40 Correct 1635 ms 15928 KB Output is correct
41 Correct 368 ms 484 KB Output is correct
42 Correct 293 ms 484 KB Output is correct
43 Correct 359 ms 484 KB Output is correct
44 Correct 225 ms 588 KB Output is correct
45 Correct 40 ms 468 KB Output is correct
46 Correct 273 ms 484 KB Output is correct
47 Correct 2565 ms 15928 KB Output is correct
48 Correct 2557 ms 15932 KB Output is correct
49 Correct 51 ms 656 KB Output is correct
50 Incorrect 36 ms 596 KB Output isn't correct
51 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15828 KB Output is correct
2 Correct 34 ms 15828 KB Output is correct
3 Correct 15 ms 15956 KB Output is correct
4 Correct 161 ms 15924 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1784 ms 16064 KB Output is correct
7 Correct 1961 ms 15972 KB Output is correct
8 Correct 1771 ms 16056 KB Output is correct
9 Correct 1892 ms 16200 KB Output is correct
10 Correct 1759 ms 15928 KB Output is correct
11 Correct 1638 ms 15932 KB Output is correct
12 Correct 24 ms 15956 KB Output is correct
13 Correct 36 ms 15896 KB Output is correct
14 Correct 19 ms 15952 KB Output is correct
15 Correct 165 ms 15928 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1975 ms 16060 KB Output is correct
18 Correct 1875 ms 15936 KB Output is correct
19 Correct 1969 ms 16052 KB Output is correct
20 Correct 1970 ms 16064 KB Output is correct
21 Correct 1793 ms 15932 KB Output is correct
22 Correct 1768 ms 15932 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 3331 ms 17020 KB Output is correct
25 Correct 2942 ms 16372 KB Output is correct
26 Correct 3743 ms 17868 KB Output is correct
27 Correct 3519 ms 17852 KB Output is correct
28 Correct 2538 ms 15932 KB Output is correct
29 Correct 2485 ms 15828 KB Output is correct
30 Correct 174 ms 15828 KB Output is correct
31 Correct 202 ms 416 KB Output is correct
32 Correct 95 ms 416 KB Output is correct
33 Correct 101 ms 424 KB Output is correct
34 Correct 211 ms 340 KB Output is correct
35 Correct 41 ms 340 KB Output is correct
36 Correct 9 ms 340 KB Output is correct
37 Correct 13 ms 432 KB Output is correct
38 Correct 70 ms 340 KB Output is correct
39 Correct 127 ms 340 KB Output is correct
40 Correct 25 ms 15828 KB Output is correct
41 Correct 41 ms 15920 KB Output is correct
42 Correct 16 ms 15952 KB Output is correct
43 Correct 163 ms 15856 KB Output is correct
44 Correct 203 ms 416 KB Output is correct
45 Correct 96 ms 416 KB Output is correct
46 Correct 111 ms 416 KB Output is correct
47 Correct 212 ms 416 KB Output is correct
48 Correct 40 ms 340 KB Output is correct
49 Correct 9 ms 432 KB Output is correct
50 Correct 14 ms 432 KB Output is correct
51 Correct 69 ms 340 KB Output is correct
52 Correct 136 ms 464 KB Output is correct
53 Correct 893 ms 412 KB Output is correct
54 Correct 377 ms 460 KB Output is correct
55 Correct 568 ms 340 KB Output is correct
56 Correct 861 ms 416 KB Output is correct
57 Correct 528 ms 416 KB Output is correct
58 Correct 161 ms 15936 KB Output is correct
59 Correct 200 ms 412 KB Output is correct
60 Correct 96 ms 416 KB Output is correct
61 Correct 100 ms 340 KB Output is correct
62 Correct 210 ms 424 KB Output is correct
63 Correct 41 ms 340 KB Output is correct
64 Correct 9 ms 428 KB Output is correct
65 Correct 14 ms 340 KB Output is correct
66 Correct 78 ms 416 KB Output is correct
67 Correct 130 ms 416 KB Output is correct
68 Correct 1705 ms 15948 KB Output is correct
69 Correct 1610 ms 15932 KB Output is correct
70 Correct 365 ms 476 KB Output is correct
71 Correct 293 ms 496 KB Output is correct
72 Correct 359 ms 492 KB Output is correct
73 Correct 213 ms 488 KB Output is correct
74 Correct 39 ms 468 KB Output is correct
75 Correct 268 ms 468 KB Output is correct
76 Correct 24 ms 15948 KB Output is correct
77 Correct 33 ms 15828 KB Output is correct
78 Correct 15 ms 15952 KB Output is correct
79 Correct 169 ms 15944 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 1894 ms 16060 KB Output is correct
82 Correct 1645 ms 15976 KB Output is correct
83 Correct 1822 ms 16048 KB Output is correct
84 Correct 1800 ms 16168 KB Output is correct
85 Correct 1655 ms 15932 KB Output is correct
86 Correct 1736 ms 15940 KB Output is correct
87 Correct 201 ms 420 KB Output is correct
88 Correct 96 ms 416 KB Output is correct
89 Correct 102 ms 340 KB Output is correct
90 Correct 214 ms 420 KB Output is correct
91 Correct 41 ms 340 KB Output is correct
92 Correct 9 ms 340 KB Output is correct
93 Correct 14 ms 432 KB Output is correct
94 Correct 70 ms 416 KB Output is correct
95 Correct 129 ms 420 KB Output is correct
96 Correct 883 ms 416 KB Output is correct
97 Correct 381 ms 416 KB Output is correct
98 Correct 574 ms 340 KB Output is correct
99 Correct 857 ms 420 KB Output is correct
100 Correct 529 ms 416 KB Output is correct
101 Correct 370 ms 480 KB Output is correct
102 Correct 292 ms 484 KB Output is correct
103 Correct 361 ms 588 KB Output is correct
104 Correct 217 ms 484 KB Output is correct
105 Correct 40 ms 468 KB Output is correct
106 Correct 268 ms 484 KB Output is correct
107 Incorrect 40 ms 468 KB Output isn't correct
108 Halted 0 ms 0 KB -