Submission #391928

# Submission time Handle Problem Language Result Execution time Memory
391928 2021-04-20T07:54:30 Z flappybird Painting Walls (APIO20_paint) C++14
100 / 100
1194 ms 28120 KB
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define MAX 202020
#define INF 101010101
//0-based index를 사용
//i번 회전 -> i번째 사람이 맨 앞으로 오도록 하는 것(실제 의미와 다름)
bool rksmd[MAX]; //[i-M+1, i]를 칠하는것이 "가능"한지 저장
ll rodtls[MAX]; //j번 회전했을때 첫번째 값이 맞았던 최근 인덱스를 저장(마지막으로 dp가 "갱신"된 for문의 i시점)
ll dp[MAX]; //for 문 i번째 실행했을때 dp[j]=k : i-1번째 상황에서 j번 돌려서 색칠하게 했을때 오른쪽에서 k번째에 터진다.
set<ll> tor[MAX]; // i번째 "색"을 칠할 수 있는 사람의 세트
bool exist(const set<ll>& s, ll x) {
	return s.find(x) != s.end();
}
//"이전" 사람이 누구인지 반환
ll dlwjs(ll x, ll M) {
	if (x == 0) return M - 1;
	else return x - 1;
}
int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
	ll i;
	for (i = 0; i < M; i++) for (auto x : B[i]) tor[x].insert(i);
	//[i-M+1, i]을 확인, 음수인 곳은 아무도 못 칠한다 가정
	for (i = 0; i <= M; i++) rodtls[i] = -1;
	for (i = 0; i < N; i++) {
		vector<pair<ll, ll>> memo; //i번째 시점에 dp를 갱신한 k만 저장
		for (auto k : tor[C[i]]) {
			//갱신 가능한 경우 : 바로 전 항목이 전 사람에 의해 갱신된 경우
			if (rodtls[dlwjs(k, M)] == i - 1) memo.push_back({ k, dp[dlwjs(k, M)] + 1 });
			else memo.push_back({ k, 1 });
		}
		for (auto a : memo) rodtls[a.first] = i, dp[a.first] = a.second;
		for (auto a : memo) if (a.second >= M) rksmd[i] = 1;
	}
	ll cnt = 0;
	ll mn = INF, lim = INF;
	for (i = N - 1; i >= 0; i--) {
		if (rksmd[i]) mn = i;
		if (i < lim) {
			lim = mn - M + 1;
			if (i < lim) return -1;
			cnt++;
		}
	}
	return cnt;
}
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9804 KB Output is correct
2 Correct 7 ms 9800 KB Output is correct
3 Correct 6 ms 9804 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 7 ms 9720 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 7 ms 9792 KB Output is correct
8 Correct 7 ms 9804 KB Output is correct
9 Correct 7 ms 9804 KB Output is correct
10 Correct 7 ms 9804 KB Output is correct
11 Correct 7 ms 9792 KB Output is correct
12 Correct 7 ms 9804 KB Output is correct
13 Correct 7 ms 9804 KB Output is correct
14 Correct 7 ms 9800 KB Output is correct
15 Correct 7 ms 9796 KB Output is correct
16 Correct 7 ms 9804 KB Output is correct
17 Correct 7 ms 9800 KB Output is correct
18 Correct 7 ms 9804 KB Output is correct
19 Correct 7 ms 9804 KB Output is correct
20 Correct 7 ms 9804 KB Output is correct
21 Correct 7 ms 9804 KB Output is correct
22 Correct 33 ms 15828 KB Output is correct
23 Correct 33 ms 15788 KB Output is correct
24 Correct 32 ms 15772 KB Output is correct
25 Correct 9 ms 9936 KB Output is correct
26 Correct 9 ms 9928 KB Output is correct
27 Correct 9 ms 9932 KB Output is correct
28 Correct 9 ms 9904 KB Output is correct
29 Correct 10 ms 9936 KB Output is correct
30 Correct 9 ms 9936 KB Output is correct
31 Correct 17 ms 11464 KB Output is correct
32 Correct 18 ms 11340 KB Output is correct
33 Correct 17 ms 11468 KB Output is correct
34 Correct 18 ms 11460 KB Output is correct
35 Correct 17 ms 11468 KB Output is correct
36 Correct 17 ms 11340 KB Output is correct
37 Correct 44 ms 16196 KB Output is correct
38 Correct 41 ms 16220 KB Output is correct
39 Correct 41 ms 16184 KB Output is correct
40 Correct 18 ms 10704 KB Output is correct
41 Correct 19 ms 10316 KB Output is correct
42 Correct 21 ms 10772 KB Output is correct
43 Correct 16 ms 10428 KB Output is correct
44 Correct 15 ms 10424 KB Output is correct
45 Correct 23 ms 10784 KB Output is correct
46 Correct 65 ms 21644 KB Output is correct
47 Correct 43 ms 16600 KB Output is correct
48 Correct 46 ms 19268 KB Output is correct
49 Correct 60 ms 19940 KB Output is correct
50 Correct 65 ms 19680 KB Output is correct
51 Correct 51 ms 16984 KB Output is correct
52 Correct 20 ms 10828 KB Output is correct
53 Correct 20 ms 10828 KB Output is correct
54 Correct 21 ms 10860 KB Output is correct
55 Correct 24 ms 10816 KB Output is correct
56 Correct 21 ms 10784 KB Output is correct
57 Correct 21 ms 10828 KB Output is correct
58 Correct 73 ms 22852 KB Output is correct
59 Correct 73 ms 22748 KB Output is correct
60 Correct 89 ms 22824 KB Output is correct
61 Correct 76 ms 22816 KB Output is correct
62 Correct 76 ms 22732 KB Output is correct
63 Correct 73 ms 22708 KB Output is correct
64 Correct 83 ms 21948 KB Output is correct
65 Correct 80 ms 21952 KB Output is correct
66 Correct 80 ms 21860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9804 KB Output is correct
2 Correct 7 ms 9800 KB Output is correct
3 Correct 6 ms 9804 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 7 ms 9720 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 7 ms 9792 KB Output is correct
8 Correct 7 ms 9804 KB Output is correct
9 Correct 7 ms 9804 KB Output is correct
10 Correct 7 ms 9804 KB Output is correct
11 Correct 7 ms 9792 KB Output is correct
12 Correct 7 ms 9804 KB Output is correct
13 Correct 7 ms 9804 KB Output is correct
14 Correct 7 ms 9800 KB Output is correct
15 Correct 7 ms 9796 KB Output is correct
16 Correct 7 ms 9804 KB Output is correct
17 Correct 7 ms 9800 KB Output is correct
18 Correct 7 ms 9804 KB Output is correct
19 Correct 7 ms 9804 KB Output is correct
20 Correct 7 ms 9804 KB Output is correct
21 Correct 7 ms 9804 KB Output is correct
22 Correct 7 ms 9704 KB Output is correct
23 Correct 7 ms 9804 KB Output is correct
24 Correct 7 ms 9804 KB Output is correct
25 Correct 8 ms 9676 KB Output is correct
26 Correct 7 ms 9804 KB Output is correct
27 Correct 7 ms 9804 KB Output is correct
28 Correct 7 ms 9804 KB Output is correct
29 Correct 7 ms 9804 KB Output is correct
30 Correct 6 ms 9796 KB Output is correct
31 Correct 6 ms 9804 KB Output is correct
32 Correct 7 ms 9792 KB Output is correct
33 Correct 7 ms 9812 KB Output is correct
34 Correct 7 ms 9796 KB Output is correct
35 Correct 7 ms 9804 KB Output is correct
36 Correct 7 ms 9796 KB Output is correct
37 Correct 7 ms 9756 KB Output is correct
38 Correct 7 ms 9804 KB Output is correct
39 Correct 6 ms 9804 KB Output is correct
40 Correct 7 ms 9796 KB Output is correct
41 Correct 7 ms 9792 KB Output is correct
42 Correct 8 ms 9804 KB Output is correct
43 Correct 7 ms 9804 KB Output is correct
44 Correct 7 ms 9804 KB Output is correct
45 Correct 7 ms 9804 KB Output is correct
46 Correct 7 ms 9804 KB Output is correct
47 Correct 7 ms 9804 KB Output is correct
48 Correct 7 ms 9760 KB Output is correct
49 Correct 7 ms 9792 KB Output is correct
50 Correct 7 ms 9804 KB Output is correct
51 Correct 7 ms 9800 KB Output is correct
52 Correct 7 ms 9796 KB Output is correct
53 Correct 7 ms 9804 KB Output is correct
54 Correct 7 ms 9796 KB Output is correct
55 Correct 7 ms 9788 KB Output is correct
56 Correct 7 ms 9804 KB Output is correct
57 Correct 7 ms 9804 KB Output is correct
58 Correct 7 ms 9800 KB Output is correct
59 Correct 7 ms 9804 KB Output is correct
60 Correct 7 ms 9800 KB Output is correct
61 Correct 7 ms 9804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9704 KB Output is correct
2 Correct 7 ms 9804 KB Output is correct
3 Correct 7 ms 9804 KB Output is correct
4 Correct 7 ms 9800 KB Output is correct
5 Correct 6 ms 9804 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 7 ms 9720 KB Output is correct
8 Correct 6 ms 9676 KB Output is correct
9 Correct 7 ms 9792 KB Output is correct
10 Correct 7 ms 9804 KB Output is correct
11 Correct 7 ms 9804 KB Output is correct
12 Correct 7 ms 9804 KB Output is correct
13 Correct 7 ms 9792 KB Output is correct
14 Correct 7 ms 9804 KB Output is correct
15 Correct 7 ms 9804 KB Output is correct
16 Correct 7 ms 9800 KB Output is correct
17 Correct 7 ms 9796 KB Output is correct
18 Correct 7 ms 9804 KB Output is correct
19 Correct 7 ms 9800 KB Output is correct
20 Correct 7 ms 9804 KB Output is correct
21 Correct 7 ms 9804 KB Output is correct
22 Correct 7 ms 9804 KB Output is correct
23 Correct 7 ms 9804 KB Output is correct
24 Correct 33 ms 15828 KB Output is correct
25 Correct 33 ms 15788 KB Output is correct
26 Correct 32 ms 15772 KB Output is correct
27 Correct 7 ms 9804 KB Output is correct
28 Correct 8 ms 9676 KB Output is correct
29 Correct 7 ms 9804 KB Output is correct
30 Correct 7 ms 9804 KB Output is correct
31 Correct 7 ms 9804 KB Output is correct
32 Correct 7 ms 9804 KB Output is correct
33 Correct 6 ms 9796 KB Output is correct
34 Correct 6 ms 9804 KB Output is correct
35 Correct 7 ms 9792 KB Output is correct
36 Correct 7 ms 9812 KB Output is correct
37 Correct 7 ms 9796 KB Output is correct
38 Correct 7 ms 9804 KB Output is correct
39 Correct 7 ms 9796 KB Output is correct
40 Correct 7 ms 9756 KB Output is correct
41 Correct 7 ms 9804 KB Output is correct
42 Correct 6 ms 9804 KB Output is correct
43 Correct 7 ms 9796 KB Output is correct
44 Correct 7 ms 9792 KB Output is correct
45 Correct 8 ms 9804 KB Output is correct
46 Correct 7 ms 9804 KB Output is correct
47 Correct 7 ms 9804 KB Output is correct
48 Correct 7 ms 9804 KB Output is correct
49 Correct 7 ms 9804 KB Output is correct
50 Correct 7 ms 9804 KB Output is correct
51 Correct 7 ms 9760 KB Output is correct
52 Correct 7 ms 9792 KB Output is correct
53 Correct 7 ms 9804 KB Output is correct
54 Correct 7 ms 9800 KB Output is correct
55 Correct 7 ms 9796 KB Output is correct
56 Correct 7 ms 9804 KB Output is correct
57 Correct 7 ms 9796 KB Output is correct
58 Correct 7 ms 9788 KB Output is correct
59 Correct 7 ms 9804 KB Output is correct
60 Correct 7 ms 9804 KB Output is correct
61 Correct 7 ms 9800 KB Output is correct
62 Correct 7 ms 9804 KB Output is correct
63 Correct 7 ms 9800 KB Output is correct
64 Correct 7 ms 9804 KB Output is correct
65 Correct 8 ms 9804 KB Output is correct
66 Correct 8 ms 9804 KB Output is correct
67 Correct 8 ms 9788 KB Output is correct
68 Correct 8 ms 9832 KB Output is correct
69 Correct 8 ms 9808 KB Output is correct
70 Correct 10 ms 10452 KB Output is correct
71 Correct 11 ms 10448 KB Output is correct
72 Correct 10 ms 10476 KB Output is correct
73 Correct 8 ms 10060 KB Output is correct
74 Correct 10 ms 10444 KB Output is correct
75 Correct 9 ms 10316 KB Output is correct
76 Correct 40 ms 16508 KB Output is correct
77 Correct 32 ms 17220 KB Output is correct
78 Correct 51 ms 18500 KB Output is correct
79 Correct 9 ms 9796 KB Output is correct
80 Correct 9 ms 9796 KB Output is correct
81 Correct 10 ms 9804 KB Output is correct
82 Correct 9 ms 9804 KB Output is correct
83 Correct 9 ms 9804 KB Output is correct
84 Correct 11 ms 10680 KB Output is correct
85 Correct 11 ms 10664 KB Output is correct
86 Correct 11 ms 10580 KB Output is correct
87 Correct 11 ms 10580 KB Output is correct
88 Correct 11 ms 10572 KB Output is correct
89 Correct 11 ms 10580 KB Output is correct
90 Correct 58 ms 19140 KB Output is correct
91 Correct 59 ms 19184 KB Output is correct
92 Correct 58 ms 19268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9704 KB Output is correct
2 Correct 7 ms 9804 KB Output is correct
3 Correct 7 ms 9804 KB Output is correct
4 Correct 7 ms 9800 KB Output is correct
5 Correct 6 ms 9804 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 7 ms 9720 KB Output is correct
8 Correct 6 ms 9676 KB Output is correct
9 Correct 7 ms 9792 KB Output is correct
10 Correct 7 ms 9804 KB Output is correct
11 Correct 7 ms 9804 KB Output is correct
12 Correct 7 ms 9804 KB Output is correct
13 Correct 7 ms 9792 KB Output is correct
14 Correct 7 ms 9804 KB Output is correct
15 Correct 7 ms 9804 KB Output is correct
16 Correct 7 ms 9800 KB Output is correct
17 Correct 7 ms 9796 KB Output is correct
18 Correct 7 ms 9804 KB Output is correct
19 Correct 7 ms 9800 KB Output is correct
20 Correct 7 ms 9804 KB Output is correct
21 Correct 7 ms 9804 KB Output is correct
22 Correct 7 ms 9804 KB Output is correct
23 Correct 7 ms 9804 KB Output is correct
24 Correct 33 ms 15828 KB Output is correct
25 Correct 33 ms 15788 KB Output is correct
26 Correct 32 ms 15772 KB Output is correct
27 Correct 9 ms 9936 KB Output is correct
28 Correct 9 ms 9928 KB Output is correct
29 Correct 9 ms 9932 KB Output is correct
30 Correct 9 ms 9904 KB Output is correct
31 Correct 10 ms 9936 KB Output is correct
32 Correct 9 ms 9936 KB Output is correct
33 Correct 17 ms 11464 KB Output is correct
34 Correct 18 ms 11340 KB Output is correct
35 Correct 17 ms 11468 KB Output is correct
36 Correct 18 ms 11460 KB Output is correct
37 Correct 17 ms 11468 KB Output is correct
38 Correct 17 ms 11340 KB Output is correct
39 Correct 44 ms 16196 KB Output is correct
40 Correct 41 ms 16220 KB Output is correct
41 Correct 41 ms 16184 KB Output is correct
42 Correct 7 ms 9804 KB Output is correct
43 Correct 8 ms 9676 KB Output is correct
44 Correct 7 ms 9804 KB Output is correct
45 Correct 7 ms 9804 KB Output is correct
46 Correct 7 ms 9804 KB Output is correct
47 Correct 7 ms 9804 KB Output is correct
48 Correct 6 ms 9796 KB Output is correct
49 Correct 6 ms 9804 KB Output is correct
50 Correct 7 ms 9792 KB Output is correct
51 Correct 7 ms 9812 KB Output is correct
52 Correct 7 ms 9796 KB Output is correct
53 Correct 7 ms 9804 KB Output is correct
54 Correct 7 ms 9796 KB Output is correct
55 Correct 7 ms 9756 KB Output is correct
56 Correct 7 ms 9804 KB Output is correct
57 Correct 6 ms 9804 KB Output is correct
58 Correct 7 ms 9796 KB Output is correct
59 Correct 7 ms 9792 KB Output is correct
60 Correct 8 ms 9804 KB Output is correct
61 Correct 7 ms 9804 KB Output is correct
62 Correct 7 ms 9804 KB Output is correct
63 Correct 7 ms 9804 KB Output is correct
64 Correct 7 ms 9804 KB Output is correct
65 Correct 7 ms 9804 KB Output is correct
66 Correct 7 ms 9760 KB Output is correct
67 Correct 7 ms 9792 KB Output is correct
68 Correct 7 ms 9804 KB Output is correct
69 Correct 7 ms 9800 KB Output is correct
70 Correct 7 ms 9796 KB Output is correct
71 Correct 7 ms 9804 KB Output is correct
72 Correct 7 ms 9796 KB Output is correct
73 Correct 7 ms 9788 KB Output is correct
74 Correct 7 ms 9804 KB Output is correct
75 Correct 7 ms 9804 KB Output is correct
76 Correct 7 ms 9800 KB Output is correct
77 Correct 7 ms 9804 KB Output is correct
78 Correct 7 ms 9800 KB Output is correct
79 Correct 7 ms 9804 KB Output is correct
80 Correct 8 ms 9804 KB Output is correct
81 Correct 8 ms 9804 KB Output is correct
82 Correct 8 ms 9788 KB Output is correct
83 Correct 8 ms 9832 KB Output is correct
84 Correct 8 ms 9808 KB Output is correct
85 Correct 10 ms 10452 KB Output is correct
86 Correct 11 ms 10448 KB Output is correct
87 Correct 10 ms 10476 KB Output is correct
88 Correct 8 ms 10060 KB Output is correct
89 Correct 10 ms 10444 KB Output is correct
90 Correct 9 ms 10316 KB Output is correct
91 Correct 40 ms 16508 KB Output is correct
92 Correct 32 ms 17220 KB Output is correct
93 Correct 51 ms 18500 KB Output is correct
94 Correct 9 ms 9796 KB Output is correct
95 Correct 9 ms 9796 KB Output is correct
96 Correct 10 ms 9804 KB Output is correct
97 Correct 9 ms 9804 KB Output is correct
98 Correct 9 ms 9804 KB Output is correct
99 Correct 11 ms 10680 KB Output is correct
100 Correct 11 ms 10664 KB Output is correct
101 Correct 11 ms 10580 KB Output is correct
102 Correct 11 ms 10580 KB Output is correct
103 Correct 11 ms 10572 KB Output is correct
104 Correct 11 ms 10580 KB Output is correct
105 Correct 58 ms 19140 KB Output is correct
106 Correct 59 ms 19184 KB Output is correct
107 Correct 58 ms 19268 KB Output is correct
108 Correct 10 ms 9932 KB Output is correct
109 Correct 174 ms 10060 KB Output is correct
110 Correct 108 ms 9932 KB Output is correct
111 Correct 88 ms 9932 KB Output is correct
112 Correct 104 ms 10136 KB Output is correct
113 Correct 69 ms 10060 KB Output is correct
114 Correct 27 ms 13384 KB Output is correct
115 Correct 28 ms 13508 KB Output is correct
116 Correct 36 ms 14404 KB Output is correct
117 Correct 27 ms 13188 KB Output is correct
118 Correct 34 ms 13764 KB Output is correct
119 Correct 24 ms 12620 KB Output is correct
120 Correct 47 ms 15556 KB Output is correct
121 Correct 13 ms 10832 KB Output is correct
122 Correct 45 ms 16996 KB Output is correct
123 Correct 12 ms 10704 KB Output is correct
124 Correct 51 ms 17568 KB Output is correct
125 Correct 16 ms 11084 KB Output is correct
126 Correct 16 ms 11348 KB Output is correct
127 Correct 20 ms 11748 KB Output is correct
128 Correct 16 ms 11240 KB Output is correct
129 Correct 16 ms 11216 KB Output is correct
130 Correct 11 ms 9948 KB Output is correct
131 Correct 242 ms 10244 KB Output is correct
132 Correct 196 ms 10060 KB Output is correct
133 Correct 175 ms 10060 KB Output is correct
134 Correct 152 ms 10064 KB Output is correct
135 Correct 134 ms 10188 KB Output is correct
136 Correct 39 ms 15108 KB Output is correct
137 Correct 42 ms 15064 KB Output is correct
138 Correct 40 ms 15220 KB Output is correct
139 Correct 39 ms 15112 KB Output is correct
140 Correct 45 ms 15044 KB Output is correct
141 Correct 49 ms 15008 KB Output is correct
142 Correct 71 ms 19660 KB Output is correct
143 Correct 18 ms 11452 KB Output is correct
144 Correct 69 ms 19616 KB Output is correct
145 Correct 18 ms 11432 KB Output is correct
146 Correct 76 ms 19616 KB Output is correct
147 Correct 18 ms 11452 KB Output is correct
148 Correct 22 ms 12108 KB Output is correct
149 Correct 21 ms 11980 KB Output is correct
150 Correct 21 ms 11920 KB Output is correct
151 Correct 20 ms 11852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9704 KB Output is correct
2 Correct 7 ms 9804 KB Output is correct
3 Correct 7 ms 9804 KB Output is correct
4 Correct 7 ms 9800 KB Output is correct
5 Correct 6 ms 9804 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 7 ms 9720 KB Output is correct
8 Correct 6 ms 9676 KB Output is correct
9 Correct 7 ms 9792 KB Output is correct
10 Correct 7 ms 9804 KB Output is correct
11 Correct 7 ms 9804 KB Output is correct
12 Correct 7 ms 9804 KB Output is correct
13 Correct 7 ms 9792 KB Output is correct
14 Correct 7 ms 9804 KB Output is correct
15 Correct 7 ms 9804 KB Output is correct
16 Correct 7 ms 9800 KB Output is correct
17 Correct 7 ms 9796 KB Output is correct
18 Correct 7 ms 9804 KB Output is correct
19 Correct 7 ms 9800 KB Output is correct
20 Correct 7 ms 9804 KB Output is correct
21 Correct 7 ms 9804 KB Output is correct
22 Correct 7 ms 9804 KB Output is correct
23 Correct 7 ms 9804 KB Output is correct
24 Correct 33 ms 15828 KB Output is correct
25 Correct 33 ms 15788 KB Output is correct
26 Correct 32 ms 15772 KB Output is correct
27 Correct 9 ms 9936 KB Output is correct
28 Correct 9 ms 9928 KB Output is correct
29 Correct 9 ms 9932 KB Output is correct
30 Correct 9 ms 9904 KB Output is correct
31 Correct 10 ms 9936 KB Output is correct
32 Correct 9 ms 9936 KB Output is correct
33 Correct 17 ms 11464 KB Output is correct
34 Correct 18 ms 11340 KB Output is correct
35 Correct 17 ms 11468 KB Output is correct
36 Correct 18 ms 11460 KB Output is correct
37 Correct 17 ms 11468 KB Output is correct
38 Correct 17 ms 11340 KB Output is correct
39 Correct 44 ms 16196 KB Output is correct
40 Correct 41 ms 16220 KB Output is correct
41 Correct 41 ms 16184 KB Output is correct
42 Correct 18 ms 10704 KB Output is correct
43 Correct 19 ms 10316 KB Output is correct
44 Correct 21 ms 10772 KB Output is correct
45 Correct 16 ms 10428 KB Output is correct
46 Correct 15 ms 10424 KB Output is correct
47 Correct 23 ms 10784 KB Output is correct
48 Correct 65 ms 21644 KB Output is correct
49 Correct 43 ms 16600 KB Output is correct
50 Correct 46 ms 19268 KB Output is correct
51 Correct 60 ms 19940 KB Output is correct
52 Correct 65 ms 19680 KB Output is correct
53 Correct 51 ms 16984 KB Output is correct
54 Correct 20 ms 10828 KB Output is correct
55 Correct 20 ms 10828 KB Output is correct
56 Correct 21 ms 10860 KB Output is correct
57 Correct 24 ms 10816 KB Output is correct
58 Correct 21 ms 10784 KB Output is correct
59 Correct 21 ms 10828 KB Output is correct
60 Correct 73 ms 22852 KB Output is correct
61 Correct 73 ms 22748 KB Output is correct
62 Correct 89 ms 22824 KB Output is correct
63 Correct 76 ms 22816 KB Output is correct
64 Correct 76 ms 22732 KB Output is correct
65 Correct 73 ms 22708 KB Output is correct
66 Correct 83 ms 21948 KB Output is correct
67 Correct 80 ms 21952 KB Output is correct
68 Correct 80 ms 21860 KB Output is correct
69 Correct 7 ms 9804 KB Output is correct
70 Correct 8 ms 9676 KB Output is correct
71 Correct 7 ms 9804 KB Output is correct
72 Correct 7 ms 9804 KB Output is correct
73 Correct 7 ms 9804 KB Output is correct
74 Correct 7 ms 9804 KB Output is correct
75 Correct 6 ms 9796 KB Output is correct
76 Correct 6 ms 9804 KB Output is correct
77 Correct 7 ms 9792 KB Output is correct
78 Correct 7 ms 9812 KB Output is correct
79 Correct 7 ms 9796 KB Output is correct
80 Correct 7 ms 9804 KB Output is correct
81 Correct 7 ms 9796 KB Output is correct
82 Correct 7 ms 9756 KB Output is correct
83 Correct 7 ms 9804 KB Output is correct
84 Correct 6 ms 9804 KB Output is correct
85 Correct 7 ms 9796 KB Output is correct
86 Correct 7 ms 9792 KB Output is correct
87 Correct 8 ms 9804 KB Output is correct
88 Correct 7 ms 9804 KB Output is correct
89 Correct 7 ms 9804 KB Output is correct
90 Correct 7 ms 9804 KB Output is correct
91 Correct 7 ms 9804 KB Output is correct
92 Correct 7 ms 9804 KB Output is correct
93 Correct 7 ms 9760 KB Output is correct
94 Correct 7 ms 9792 KB Output is correct
95 Correct 7 ms 9804 KB Output is correct
96 Correct 7 ms 9800 KB Output is correct
97 Correct 7 ms 9796 KB Output is correct
98 Correct 7 ms 9804 KB Output is correct
99 Correct 7 ms 9796 KB Output is correct
100 Correct 7 ms 9788 KB Output is correct
101 Correct 7 ms 9804 KB Output is correct
102 Correct 7 ms 9804 KB Output is correct
103 Correct 7 ms 9800 KB Output is correct
104 Correct 7 ms 9804 KB Output is correct
105 Correct 7 ms 9800 KB Output is correct
106 Correct 7 ms 9804 KB Output is correct
107 Correct 8 ms 9804 KB Output is correct
108 Correct 8 ms 9804 KB Output is correct
109 Correct 8 ms 9788 KB Output is correct
110 Correct 8 ms 9832 KB Output is correct
111 Correct 8 ms 9808 KB Output is correct
112 Correct 10 ms 10452 KB Output is correct
113 Correct 11 ms 10448 KB Output is correct
114 Correct 10 ms 10476 KB Output is correct
115 Correct 8 ms 10060 KB Output is correct
116 Correct 10 ms 10444 KB Output is correct
117 Correct 9 ms 10316 KB Output is correct
118 Correct 40 ms 16508 KB Output is correct
119 Correct 32 ms 17220 KB Output is correct
120 Correct 51 ms 18500 KB Output is correct
121 Correct 9 ms 9796 KB Output is correct
122 Correct 9 ms 9796 KB Output is correct
123 Correct 10 ms 9804 KB Output is correct
124 Correct 9 ms 9804 KB Output is correct
125 Correct 9 ms 9804 KB Output is correct
126 Correct 11 ms 10680 KB Output is correct
127 Correct 11 ms 10664 KB Output is correct
128 Correct 11 ms 10580 KB Output is correct
129 Correct 11 ms 10580 KB Output is correct
130 Correct 11 ms 10572 KB Output is correct
131 Correct 11 ms 10580 KB Output is correct
132 Correct 58 ms 19140 KB Output is correct
133 Correct 59 ms 19184 KB Output is correct
134 Correct 58 ms 19268 KB Output is correct
135 Correct 10 ms 9932 KB Output is correct
136 Correct 174 ms 10060 KB Output is correct
137 Correct 108 ms 9932 KB Output is correct
138 Correct 88 ms 9932 KB Output is correct
139 Correct 104 ms 10136 KB Output is correct
140 Correct 69 ms 10060 KB Output is correct
141 Correct 27 ms 13384 KB Output is correct
142 Correct 28 ms 13508 KB Output is correct
143 Correct 36 ms 14404 KB Output is correct
144 Correct 27 ms 13188 KB Output is correct
145 Correct 34 ms 13764 KB Output is correct
146 Correct 24 ms 12620 KB Output is correct
147 Correct 47 ms 15556 KB Output is correct
148 Correct 13 ms 10832 KB Output is correct
149 Correct 45 ms 16996 KB Output is correct
150 Correct 12 ms 10704 KB Output is correct
151 Correct 51 ms 17568 KB Output is correct
152 Correct 16 ms 11084 KB Output is correct
153 Correct 16 ms 11348 KB Output is correct
154 Correct 20 ms 11748 KB Output is correct
155 Correct 16 ms 11240 KB Output is correct
156 Correct 16 ms 11216 KB Output is correct
157 Correct 11 ms 9948 KB Output is correct
158 Correct 242 ms 10244 KB Output is correct
159 Correct 196 ms 10060 KB Output is correct
160 Correct 175 ms 10060 KB Output is correct
161 Correct 152 ms 10064 KB Output is correct
162 Correct 134 ms 10188 KB Output is correct
163 Correct 39 ms 15108 KB Output is correct
164 Correct 42 ms 15064 KB Output is correct
165 Correct 40 ms 15220 KB Output is correct
166 Correct 39 ms 15112 KB Output is correct
167 Correct 45 ms 15044 KB Output is correct
168 Correct 49 ms 15008 KB Output is correct
169 Correct 71 ms 19660 KB Output is correct
170 Correct 18 ms 11452 KB Output is correct
171 Correct 69 ms 19616 KB Output is correct
172 Correct 18 ms 11432 KB Output is correct
173 Correct 76 ms 19616 KB Output is correct
174 Correct 18 ms 11452 KB Output is correct
175 Correct 22 ms 12108 KB Output is correct
176 Correct 21 ms 11980 KB Output is correct
177 Correct 21 ms 11920 KB Output is correct
178 Correct 20 ms 11852 KB Output is correct
179 Correct 17 ms 10432 KB Output is correct
180 Correct 470 ms 10428 KB Output is correct
181 Correct 605 ms 10660 KB Output is correct
182 Correct 792 ms 10936 KB Output is correct
183 Correct 391 ms 10628 KB Output is correct
184 Correct 314 ms 10572 KB Output is correct
185 Correct 53 ms 17192 KB Output is correct
186 Correct 43 ms 16588 KB Output is correct
187 Correct 67 ms 18624 KB Output is correct
188 Correct 66 ms 17348 KB Output is correct
189 Correct 65 ms 16528 KB Output is correct
190 Correct 83 ms 19408 KB Output is correct
191 Correct 64 ms 17216 KB Output is correct
192 Correct 55 ms 16172 KB Output is correct
193 Correct 53 ms 14732 KB Output is correct
194 Correct 23 ms 10828 KB Output is correct
195 Correct 1194 ms 11184 KB Output is correct
196 Correct 968 ms 10948 KB Output is correct
197 Correct 803 ms 10964 KB Output is correct
198 Correct 706 ms 10956 KB Output is correct
199 Correct 635 ms 11024 KB Output is correct
200 Correct 123 ms 28072 KB Output is correct
201 Correct 123 ms 28096 KB Output is correct
202 Correct 130 ms 28120 KB Output is correct
203 Correct 129 ms 28100 KB Output is correct
204 Correct 126 ms 28104 KB Output is correct
205 Correct 122 ms 28092 KB Output is correct
206 Correct 135 ms 25552 KB Output is correct
207 Correct 90 ms 22756 KB Output is correct
208 Correct 132 ms 25660 KB Output is correct
209 Correct 94 ms 22724 KB Output is correct
210 Correct 126 ms 25536 KB Output is correct
211 Correct 97 ms 22716 KB Output is correct
212 Correct 108 ms 25424 KB Output is correct
213 Correct 116 ms 22160 KB Output is correct
214 Correct 94 ms 21696 KB Output is correct
215 Correct 108 ms 22084 KB Output is correct