답안 #292942

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
292942 2020-09-07T14:54:51 Z arnold518 벽 칠하기 (APIO20_paint) C++14
63 / 100
1500 ms 16376 KB
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int INF = 1e9;

const int MAXN = 1e5;
const int MAXM = 5e4;
const int MAXK = 1e5;

int N, M, K;
int C[MAXN+10], A[MAXM+10];
vector<int> B[MAXM+10];
vector<int> D[MAXK+10];
int dp[MAXN+10];
int P[MAXM+10];

int minimumInstructions(int _N, int _M, int _K, vector<int> _C, vector<int> _A, vector<vector<int>> _B)
{
	N=_N; M=_M; K=_K;
	for(int i=1; i<=N; i++) C[i]=_C[i-1];
	for(int i=0; i<M; i++) A[i]=_A[i];
	for(int i=0; i<M; i++) B[i]=_B[i];

	for(int i=0; i<M; i++)
	{
		for(auto it : B[i])
		{
			D[it].push_back(i);
		}
	}

	for(int i=1; i<=N; i++) if(D[C[i]].empty()) return -1;

	for(int i=1; i<M; i++)
	{
		for(auto it : D[C[i]])
		{
			P[((it-i)%M+M)%M]++;
		}
	}

	int cnt=0;
	for(int i=0; i<M; i++) if(P[i]==M) cnt++;

	deque<int> DQ;
	for(int i=1; i<=N; i++) dp[i]=INF;

	DQ.push_back(0); DQ.push_back(M-1);
	for(int i=M; i<=N; i++)
	{
		if(i!=M) for(auto it : D[C[i-M]])
		{
			if(P[((it-i)%M+M)%M]==M) cnt--;
			P[((it-i)%M+M)%M]--;
		}
		for(auto it : D[C[i]])
		{
			P[((it-i)%M+M)%M]++;
			if(P[((it-i)%M+M)%M]==M) cnt++;
		}
		
		while(!DQ.empty() && DQ.front()<i-M) DQ.pop_front();
		if(cnt && dp[DQ.front()]!=INF) dp[i]=dp[DQ.front()]+1;
		while(!DQ.empty() && dp[DQ.back()]>=dp[i]) DQ.pop_back();
		DQ.push_back(i);
	}

	if(dp[N]==INF) return -1;
	else return dp[N];
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3840 KB Output is correct
2 Correct 3 ms 3840 KB Output is correct
3 Correct 3 ms 3840 KB Output is correct
4 Correct 3 ms 3840 KB Output is correct
5 Correct 3 ms 3840 KB Output is correct
6 Correct 3 ms 3840 KB Output is correct
7 Correct 3 ms 3840 KB Output is correct
8 Correct 3 ms 3840 KB Output is correct
9 Correct 3 ms 3840 KB Output is correct
10 Correct 3 ms 3840 KB Output is correct
11 Correct 3 ms 3840 KB Output is correct
12 Correct 3 ms 3840 KB Output is correct
13 Correct 3 ms 3840 KB Output is correct
14 Correct 3 ms 3840 KB Output is correct
15 Correct 3 ms 3840 KB Output is correct
16 Correct 3 ms 3840 KB Output is correct
17 Correct 3 ms 3840 KB Output is correct
18 Correct 3 ms 3840 KB Output is correct
19 Correct 3 ms 3968 KB Output is correct
20 Correct 3 ms 3968 KB Output is correct
21 Correct 3 ms 3968 KB Output is correct
22 Correct 28 ms 8192 KB Output is correct
23 Correct 28 ms 8192 KB Output is correct
24 Correct 30 ms 8184 KB Output is correct
25 Correct 6 ms 4224 KB Output is correct
26 Correct 7 ms 4224 KB Output is correct
27 Correct 7 ms 4224 KB Output is correct
28 Correct 6 ms 4224 KB Output is correct
29 Correct 6 ms 4224 KB Output is correct
30 Correct 7 ms 4224 KB Output is correct
31 Correct 15 ms 5248 KB Output is correct
32 Correct 15 ms 5248 KB Output is correct
33 Correct 14 ms 5248 KB Output is correct
34 Correct 13 ms 5248 KB Output is correct
35 Correct 18 ms 5248 KB Output is correct
36 Correct 14 ms 5248 KB Output is correct
37 Correct 39 ms 8696 KB Output is correct
38 Correct 39 ms 8704 KB Output is correct
39 Correct 41 ms 8696 KB Output is correct
40 Correct 19 ms 5248 KB Output is correct
41 Correct 14 ms 4736 KB Output is correct
42 Correct 20 ms 5376 KB Output is correct
43 Correct 17 ms 4864 KB Output is correct
44 Correct 12 ms 4736 KB Output is correct
45 Correct 19 ms 5376 KB Output is correct
46 Correct 65 ms 15356 KB Output is correct
47 Correct 42 ms 10232 KB Output is correct
48 Correct 48 ms 13432 KB Output is correct
49 Correct 67 ms 13560 KB Output is correct
50 Correct 65 ms 13016 KB Output is correct
51 Correct 55 ms 10348 KB Output is correct
52 Correct 19 ms 5376 KB Output is correct
53 Correct 19 ms 5376 KB Output is correct
54 Correct 21 ms 5504 KB Output is correct
55 Correct 19 ms 5376 KB Output is correct
56 Correct 19 ms 5376 KB Output is correct
57 Correct 19 ms 5376 KB Output is correct
58 Correct 73 ms 16120 KB Output is correct
59 Correct 80 ms 16120 KB Output is correct
60 Correct 83 ms 16376 KB Output is correct
61 Correct 74 ms 16120 KB Output is correct
62 Correct 72 ms 16120 KB Output is correct
63 Correct 71 ms 16120 KB Output is correct
64 Correct 88 ms 15352 KB Output is correct
65 Correct 84 ms 15352 KB Output is correct
66 Correct 82 ms 15352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3840 KB Output is correct
2 Correct 3 ms 3840 KB Output is correct
3 Correct 3 ms 3840 KB Output is correct
4 Correct 3 ms 3840 KB Output is correct
5 Correct 3 ms 3840 KB Output is correct
6 Correct 3 ms 3840 KB Output is correct
7 Correct 3 ms 3840 KB Output is correct
8 Correct 3 ms 3840 KB Output is correct
9 Correct 3 ms 3840 KB Output is correct
10 Correct 3 ms 3840 KB Output is correct
11 Correct 3 ms 3840 KB Output is correct
12 Correct 3 ms 3840 KB Output is correct
13 Correct 3 ms 3840 KB Output is correct
14 Correct 3 ms 3840 KB Output is correct
15 Correct 3 ms 3840 KB Output is correct
16 Correct 3 ms 3840 KB Output is correct
17 Correct 3 ms 3840 KB Output is correct
18 Correct 3 ms 3840 KB Output is correct
19 Correct 3 ms 3840 KB Output is correct
20 Correct 3 ms 3840 KB Output is correct
21 Correct 3 ms 3968 KB Output is correct
22 Correct 3 ms 3968 KB Output is correct
23 Correct 3 ms 3968 KB Output is correct
24 Correct 3 ms 3840 KB Output is correct
25 Correct 3 ms 3840 KB Output is correct
26 Correct 2 ms 3840 KB Output is correct
27 Correct 3 ms 3840 KB Output is correct
28 Correct 3 ms 3840 KB Output is correct
29 Correct 3 ms 3840 KB Output is correct
30 Correct 3 ms 3840 KB Output is correct
31 Correct 3 ms 3840 KB Output is correct
32 Correct 3 ms 3840 KB Output is correct
33 Correct 3 ms 3840 KB Output is correct
34 Correct 3 ms 3840 KB Output is correct
35 Correct 3 ms 3840 KB Output is correct
36 Correct 3 ms 3840 KB Output is correct
37 Correct 3 ms 3840 KB Output is correct
38 Correct 3 ms 3840 KB Output is correct
39 Correct 3 ms 3840 KB Output is correct
40 Correct 4 ms 3968 KB Output is correct
41 Correct 3 ms 3840 KB Output is correct
42 Correct 3 ms 3840 KB Output is correct
43 Correct 3 ms 3840 KB Output is correct
44 Correct 3 ms 3840 KB Output is correct
45 Correct 3 ms 3840 KB Output is correct
46 Correct 3 ms 3840 KB Output is correct
47 Correct 3 ms 3840 KB Output is correct
48 Correct 3 ms 3840 KB Output is correct
49 Correct 3 ms 3840 KB Output is correct
50 Correct 3 ms 3840 KB Output is correct
51 Correct 3 ms 3840 KB Output is correct
52 Correct 3 ms 3968 KB Output is correct
53 Correct 3 ms 3840 KB Output is correct
54 Correct 3 ms 3840 KB Output is correct
55 Correct 3 ms 3840 KB Output is correct
56 Correct 3 ms 3968 KB Output is correct
57 Correct 3 ms 3840 KB Output is correct
58 Correct 4 ms 3968 KB Output is correct
59 Correct 3 ms 3840 KB Output is correct
60 Correct 3 ms 3968 KB Output is correct
61 Correct 3 ms 3840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3840 KB Output is correct
2 Correct 3 ms 3840 KB Output is correct
3 Correct 3 ms 3840 KB Output is correct
4 Correct 3 ms 3840 KB Output is correct
5 Correct 3 ms 3840 KB Output is correct
6 Correct 3 ms 3840 KB Output is correct
7 Correct 3 ms 3840 KB Output is correct
8 Correct 3 ms 3840 KB Output is correct
9 Correct 3 ms 3840 KB Output is correct
10 Correct 3 ms 3840 KB Output is correct
11 Correct 3 ms 3840 KB Output is correct
12 Correct 3 ms 3840 KB Output is correct
13 Correct 3 ms 3840 KB Output is correct
14 Correct 3 ms 3840 KB Output is correct
15 Correct 3 ms 3840 KB Output is correct
16 Correct 3 ms 3840 KB Output is correct
17 Correct 3 ms 3840 KB Output is correct
18 Correct 3 ms 3840 KB Output is correct
19 Correct 3 ms 3840 KB Output is correct
20 Correct 3 ms 3840 KB Output is correct
21 Correct 3 ms 3968 KB Output is correct
22 Correct 3 ms 3968 KB Output is correct
23 Correct 3 ms 3968 KB Output is correct
24 Correct 28 ms 8192 KB Output is correct
25 Correct 28 ms 8192 KB Output is correct
26 Correct 30 ms 8184 KB Output is correct
27 Correct 3 ms 3840 KB Output is correct
28 Correct 3 ms 3840 KB Output is correct
29 Correct 2 ms 3840 KB Output is correct
30 Correct 3 ms 3840 KB Output is correct
31 Correct 3 ms 3840 KB Output is correct
32 Correct 3 ms 3840 KB Output is correct
33 Correct 3 ms 3840 KB Output is correct
34 Correct 3 ms 3840 KB Output is correct
35 Correct 3 ms 3840 KB Output is correct
36 Correct 3 ms 3840 KB Output is correct
37 Correct 3 ms 3840 KB Output is correct
38 Correct 3 ms 3840 KB Output is correct
39 Correct 3 ms 3840 KB Output is correct
40 Correct 3 ms 3840 KB Output is correct
41 Correct 3 ms 3840 KB Output is correct
42 Correct 3 ms 3840 KB Output is correct
43 Correct 4 ms 3968 KB Output is correct
44 Correct 3 ms 3840 KB Output is correct
45 Correct 3 ms 3840 KB Output is correct
46 Correct 3 ms 3840 KB Output is correct
47 Correct 3 ms 3840 KB Output is correct
48 Correct 3 ms 3840 KB Output is correct
49 Correct 3 ms 3840 KB Output is correct
50 Correct 3 ms 3840 KB Output is correct
51 Correct 3 ms 3840 KB Output is correct
52 Correct 3 ms 3840 KB Output is correct
53 Correct 3 ms 3840 KB Output is correct
54 Correct 3 ms 3840 KB Output is correct
55 Correct 3 ms 3968 KB Output is correct
56 Correct 3 ms 3840 KB Output is correct
57 Correct 3 ms 3840 KB Output is correct
58 Correct 3 ms 3840 KB Output is correct
59 Correct 3 ms 3968 KB Output is correct
60 Correct 3 ms 3840 KB Output is correct
61 Correct 4 ms 3968 KB Output is correct
62 Correct 3 ms 3840 KB Output is correct
63 Correct 3 ms 3968 KB Output is correct
64 Correct 3 ms 3840 KB Output is correct
65 Correct 4 ms 3840 KB Output is correct
66 Correct 3 ms 3840 KB Output is correct
67 Correct 4 ms 3840 KB Output is correct
68 Correct 4 ms 3840 KB Output is correct
69 Correct 4 ms 3840 KB Output is correct
70 Correct 5 ms 4096 KB Output is correct
71 Correct 5 ms 4096 KB Output is correct
72 Correct 5 ms 4096 KB Output is correct
73 Correct 4 ms 3968 KB Output is correct
74 Correct 5 ms 4096 KB Output is correct
75 Correct 5 ms 4088 KB Output is correct
76 Correct 41 ms 6904 KB Output is correct
77 Correct 27 ms 7424 KB Output is correct
78 Correct 38 ms 7928 KB Output is correct
79 Correct 5 ms 3840 KB Output is correct
80 Correct 5 ms 3840 KB Output is correct
81 Correct 5 ms 3840 KB Output is correct
82 Correct 5 ms 3840 KB Output is correct
83 Correct 5 ms 3968 KB Output is correct
84 Correct 6 ms 4224 KB Output is correct
85 Correct 6 ms 4224 KB Output is correct
86 Correct 6 ms 4224 KB Output is correct
87 Correct 6 ms 4224 KB Output is correct
88 Correct 6 ms 4224 KB Output is correct
89 Correct 6 ms 4224 KB Output is correct
90 Correct 44 ms 8184 KB Output is correct
91 Correct 46 ms 8184 KB Output is correct
92 Correct 44 ms 8184 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3840 KB Output is correct
2 Correct 3 ms 3840 KB Output is correct
3 Correct 3 ms 3840 KB Output is correct
4 Correct 3 ms 3840 KB Output is correct
5 Correct 3 ms 3840 KB Output is correct
6 Correct 3 ms 3840 KB Output is correct
7 Correct 3 ms 3840 KB Output is correct
8 Correct 3 ms 3840 KB Output is correct
9 Correct 3 ms 3840 KB Output is correct
10 Correct 3 ms 3840 KB Output is correct
11 Correct 3 ms 3840 KB Output is correct
12 Correct 3 ms 3840 KB Output is correct
13 Correct 3 ms 3840 KB Output is correct
14 Correct 3 ms 3840 KB Output is correct
15 Correct 3 ms 3840 KB Output is correct
16 Correct 3 ms 3840 KB Output is correct
17 Correct 3 ms 3840 KB Output is correct
18 Correct 3 ms 3840 KB Output is correct
19 Correct 3 ms 3840 KB Output is correct
20 Correct 3 ms 3840 KB Output is correct
21 Correct 3 ms 3968 KB Output is correct
22 Correct 3 ms 3968 KB Output is correct
23 Correct 3 ms 3968 KB Output is correct
24 Correct 28 ms 8192 KB Output is correct
25 Correct 28 ms 8192 KB Output is correct
26 Correct 30 ms 8184 KB Output is correct
27 Correct 6 ms 4224 KB Output is correct
28 Correct 7 ms 4224 KB Output is correct
29 Correct 7 ms 4224 KB Output is correct
30 Correct 6 ms 4224 KB Output is correct
31 Correct 6 ms 4224 KB Output is correct
32 Correct 7 ms 4224 KB Output is correct
33 Correct 15 ms 5248 KB Output is correct
34 Correct 15 ms 5248 KB Output is correct
35 Correct 14 ms 5248 KB Output is correct
36 Correct 13 ms 5248 KB Output is correct
37 Correct 18 ms 5248 KB Output is correct
38 Correct 14 ms 5248 KB Output is correct
39 Correct 39 ms 8696 KB Output is correct
40 Correct 39 ms 8704 KB Output is correct
41 Correct 41 ms 8696 KB Output is correct
42 Correct 3 ms 3840 KB Output is correct
43 Correct 3 ms 3840 KB Output is correct
44 Correct 2 ms 3840 KB Output is correct
45 Correct 3 ms 3840 KB Output is correct
46 Correct 3 ms 3840 KB Output is correct
47 Correct 3 ms 3840 KB Output is correct
48 Correct 3 ms 3840 KB Output is correct
49 Correct 3 ms 3840 KB Output is correct
50 Correct 3 ms 3840 KB Output is correct
51 Correct 3 ms 3840 KB Output is correct
52 Correct 3 ms 3840 KB Output is correct
53 Correct 3 ms 3840 KB Output is correct
54 Correct 3 ms 3840 KB Output is correct
55 Correct 3 ms 3840 KB Output is correct
56 Correct 3 ms 3840 KB Output is correct
57 Correct 3 ms 3840 KB Output is correct
58 Correct 4 ms 3968 KB Output is correct
59 Correct 3 ms 3840 KB Output is correct
60 Correct 3 ms 3840 KB Output is correct
61 Correct 3 ms 3840 KB Output is correct
62 Correct 3 ms 3840 KB Output is correct
63 Correct 3 ms 3840 KB Output is correct
64 Correct 3 ms 3840 KB Output is correct
65 Correct 3 ms 3840 KB Output is correct
66 Correct 3 ms 3840 KB Output is correct
67 Correct 3 ms 3840 KB Output is correct
68 Correct 3 ms 3840 KB Output is correct
69 Correct 3 ms 3840 KB Output is correct
70 Correct 3 ms 3968 KB Output is correct
71 Correct 3 ms 3840 KB Output is correct
72 Correct 3 ms 3840 KB Output is correct
73 Correct 3 ms 3840 KB Output is correct
74 Correct 3 ms 3968 KB Output is correct
75 Correct 3 ms 3840 KB Output is correct
76 Correct 4 ms 3968 KB Output is correct
77 Correct 3 ms 3840 KB Output is correct
78 Correct 3 ms 3968 KB Output is correct
79 Correct 3 ms 3840 KB Output is correct
80 Correct 4 ms 3840 KB Output is correct
81 Correct 3 ms 3840 KB Output is correct
82 Correct 4 ms 3840 KB Output is correct
83 Correct 4 ms 3840 KB Output is correct
84 Correct 4 ms 3840 KB Output is correct
85 Correct 5 ms 4096 KB Output is correct
86 Correct 5 ms 4096 KB Output is correct
87 Correct 5 ms 4096 KB Output is correct
88 Correct 4 ms 3968 KB Output is correct
89 Correct 5 ms 4096 KB Output is correct
90 Correct 5 ms 4088 KB Output is correct
91 Correct 41 ms 6904 KB Output is correct
92 Correct 27 ms 7424 KB Output is correct
93 Correct 38 ms 7928 KB Output is correct
94 Correct 5 ms 3840 KB Output is correct
95 Correct 5 ms 3840 KB Output is correct
96 Correct 5 ms 3840 KB Output is correct
97 Correct 5 ms 3840 KB Output is correct
98 Correct 5 ms 3968 KB Output is correct
99 Correct 6 ms 4224 KB Output is correct
100 Correct 6 ms 4224 KB Output is correct
101 Correct 6 ms 4224 KB Output is correct
102 Correct 6 ms 4224 KB Output is correct
103 Correct 6 ms 4224 KB Output is correct
104 Correct 6 ms 4224 KB Output is correct
105 Correct 44 ms 8184 KB Output is correct
106 Correct 46 ms 8184 KB Output is correct
107 Correct 44 ms 8184 KB Output is correct
108 Correct 7 ms 4224 KB Output is correct
109 Correct 249 ms 4360 KB Output is correct
110 Correct 135 ms 4216 KB Output is correct
111 Correct 96 ms 4096 KB Output is correct
112 Correct 117 ms 4276 KB Output is correct
113 Correct 77 ms 4224 KB Output is correct
114 Correct 21 ms 5504 KB Output is correct
115 Correct 20 ms 5376 KB Output is correct
116 Correct 26 ms 5632 KB Output is correct
117 Correct 20 ms 5376 KB Output is correct
118 Correct 22 ms 5504 KB Output is correct
119 Correct 19 ms 5120 KB Output is correct
120 Correct 29 ms 6776 KB Output is correct
121 Correct 10 ms 4608 KB Output is correct
122 Correct 35 ms 7032 KB Output is correct
123 Correct 9 ms 4480 KB Output is correct
124 Correct 37 ms 7544 KB Output is correct
125 Correct 13 ms 4736 KB Output is correct
126 Correct 12 ms 4864 KB Output is correct
127 Correct 16 ms 5120 KB Output is correct
128 Correct 12 ms 4736 KB Output is correct
129 Correct 12 ms 4736 KB Output is correct
130 Correct 7 ms 4096 KB Output is correct
131 Correct 340 ms 4224 KB Output is correct
132 Correct 249 ms 4480 KB Output is correct
133 Correct 204 ms 4352 KB Output is correct
134 Correct 173 ms 4352 KB Output is correct
135 Correct 157 ms 4352 KB Output is correct
136 Correct 29 ms 5880 KB Output is correct
137 Correct 29 ms 5880 KB Output is correct
138 Correct 29 ms 5884 KB Output is correct
139 Correct 29 ms 5888 KB Output is correct
140 Correct 31 ms 5888 KB Output is correct
141 Correct 30 ms 5888 KB Output is correct
142 Correct 52 ms 8696 KB Output is correct
143 Correct 16 ms 4992 KB Output is correct
144 Correct 50 ms 8696 KB Output is correct
145 Correct 14 ms 4992 KB Output is correct
146 Correct 52 ms 8568 KB Output is correct
147 Correct 15 ms 4992 KB Output is correct
148 Correct 17 ms 5376 KB Output is correct
149 Correct 18 ms 5248 KB Output is correct
150 Correct 17 ms 5248 KB Output is correct
151 Correct 16 ms 5120 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3840 KB Output is correct
2 Correct 3 ms 3840 KB Output is correct
3 Correct 3 ms 3840 KB Output is correct
4 Correct 3 ms 3840 KB Output is correct
5 Correct 3 ms 3840 KB Output is correct
6 Correct 3 ms 3840 KB Output is correct
7 Correct 3 ms 3840 KB Output is correct
8 Correct 3 ms 3840 KB Output is correct
9 Correct 3 ms 3840 KB Output is correct
10 Correct 3 ms 3840 KB Output is correct
11 Correct 3 ms 3840 KB Output is correct
12 Correct 3 ms 3840 KB Output is correct
13 Correct 3 ms 3840 KB Output is correct
14 Correct 3 ms 3840 KB Output is correct
15 Correct 3 ms 3840 KB Output is correct
16 Correct 3 ms 3840 KB Output is correct
17 Correct 3 ms 3840 KB Output is correct
18 Correct 3 ms 3840 KB Output is correct
19 Correct 3 ms 3840 KB Output is correct
20 Correct 3 ms 3840 KB Output is correct
21 Correct 3 ms 3968 KB Output is correct
22 Correct 3 ms 3968 KB Output is correct
23 Correct 3 ms 3968 KB Output is correct
24 Correct 28 ms 8192 KB Output is correct
25 Correct 28 ms 8192 KB Output is correct
26 Correct 30 ms 8184 KB Output is correct
27 Correct 6 ms 4224 KB Output is correct
28 Correct 7 ms 4224 KB Output is correct
29 Correct 7 ms 4224 KB Output is correct
30 Correct 6 ms 4224 KB Output is correct
31 Correct 6 ms 4224 KB Output is correct
32 Correct 7 ms 4224 KB Output is correct
33 Correct 15 ms 5248 KB Output is correct
34 Correct 15 ms 5248 KB Output is correct
35 Correct 14 ms 5248 KB Output is correct
36 Correct 13 ms 5248 KB Output is correct
37 Correct 18 ms 5248 KB Output is correct
38 Correct 14 ms 5248 KB Output is correct
39 Correct 39 ms 8696 KB Output is correct
40 Correct 39 ms 8704 KB Output is correct
41 Correct 41 ms 8696 KB Output is correct
42 Correct 19 ms 5248 KB Output is correct
43 Correct 14 ms 4736 KB Output is correct
44 Correct 20 ms 5376 KB Output is correct
45 Correct 17 ms 4864 KB Output is correct
46 Correct 12 ms 4736 KB Output is correct
47 Correct 19 ms 5376 KB Output is correct
48 Correct 65 ms 15356 KB Output is correct
49 Correct 42 ms 10232 KB Output is correct
50 Correct 48 ms 13432 KB Output is correct
51 Correct 67 ms 13560 KB Output is correct
52 Correct 65 ms 13016 KB Output is correct
53 Correct 55 ms 10348 KB Output is correct
54 Correct 19 ms 5376 KB Output is correct
55 Correct 19 ms 5376 KB Output is correct
56 Correct 21 ms 5504 KB Output is correct
57 Correct 19 ms 5376 KB Output is correct
58 Correct 19 ms 5376 KB Output is correct
59 Correct 19 ms 5376 KB Output is correct
60 Correct 73 ms 16120 KB Output is correct
61 Correct 80 ms 16120 KB Output is correct
62 Correct 83 ms 16376 KB Output is correct
63 Correct 74 ms 16120 KB Output is correct
64 Correct 72 ms 16120 KB Output is correct
65 Correct 71 ms 16120 KB Output is correct
66 Correct 88 ms 15352 KB Output is correct
67 Correct 84 ms 15352 KB Output is correct
68 Correct 82 ms 15352 KB Output is correct
69 Correct 3 ms 3840 KB Output is correct
70 Correct 3 ms 3840 KB Output is correct
71 Correct 2 ms 3840 KB Output is correct
72 Correct 3 ms 3840 KB Output is correct
73 Correct 3 ms 3840 KB Output is correct
74 Correct 3 ms 3840 KB Output is correct
75 Correct 3 ms 3840 KB Output is correct
76 Correct 3 ms 3840 KB Output is correct
77 Correct 3 ms 3840 KB Output is correct
78 Correct 3 ms 3840 KB Output is correct
79 Correct 3 ms 3840 KB Output is correct
80 Correct 3 ms 3840 KB Output is correct
81 Correct 3 ms 3840 KB Output is correct
82 Correct 3 ms 3840 KB Output is correct
83 Correct 3 ms 3840 KB Output is correct
84 Correct 3 ms 3840 KB Output is correct
85 Correct 4 ms 3968 KB Output is correct
86 Correct 3 ms 3840 KB Output is correct
87 Correct 3 ms 3840 KB Output is correct
88 Correct 3 ms 3840 KB Output is correct
89 Correct 3 ms 3840 KB Output is correct
90 Correct 3 ms 3840 KB Output is correct
91 Correct 3 ms 3840 KB Output is correct
92 Correct 3 ms 3840 KB Output is correct
93 Correct 3 ms 3840 KB Output is correct
94 Correct 3 ms 3840 KB Output is correct
95 Correct 3 ms 3840 KB Output is correct
96 Correct 3 ms 3840 KB Output is correct
97 Correct 3 ms 3968 KB Output is correct
98 Correct 3 ms 3840 KB Output is correct
99 Correct 3 ms 3840 KB Output is correct
100 Correct 3 ms 3840 KB Output is correct
101 Correct 3 ms 3968 KB Output is correct
102 Correct 3 ms 3840 KB Output is correct
103 Correct 4 ms 3968 KB Output is correct
104 Correct 3 ms 3840 KB Output is correct
105 Correct 3 ms 3968 KB Output is correct
106 Correct 3 ms 3840 KB Output is correct
107 Correct 4 ms 3840 KB Output is correct
108 Correct 3 ms 3840 KB Output is correct
109 Correct 4 ms 3840 KB Output is correct
110 Correct 4 ms 3840 KB Output is correct
111 Correct 4 ms 3840 KB Output is correct
112 Correct 5 ms 4096 KB Output is correct
113 Correct 5 ms 4096 KB Output is correct
114 Correct 5 ms 4096 KB Output is correct
115 Correct 4 ms 3968 KB Output is correct
116 Correct 5 ms 4096 KB Output is correct
117 Correct 5 ms 4088 KB Output is correct
118 Correct 41 ms 6904 KB Output is correct
119 Correct 27 ms 7424 KB Output is correct
120 Correct 38 ms 7928 KB Output is correct
121 Correct 5 ms 3840 KB Output is correct
122 Correct 5 ms 3840 KB Output is correct
123 Correct 5 ms 3840 KB Output is correct
124 Correct 5 ms 3840 KB Output is correct
125 Correct 5 ms 3968 KB Output is correct
126 Correct 6 ms 4224 KB Output is correct
127 Correct 6 ms 4224 KB Output is correct
128 Correct 6 ms 4224 KB Output is correct
129 Correct 6 ms 4224 KB Output is correct
130 Correct 6 ms 4224 KB Output is correct
131 Correct 6 ms 4224 KB Output is correct
132 Correct 44 ms 8184 KB Output is correct
133 Correct 46 ms 8184 KB Output is correct
134 Correct 44 ms 8184 KB Output is correct
135 Correct 7 ms 4224 KB Output is correct
136 Correct 249 ms 4360 KB Output is correct
137 Correct 135 ms 4216 KB Output is correct
138 Correct 96 ms 4096 KB Output is correct
139 Correct 117 ms 4276 KB Output is correct
140 Correct 77 ms 4224 KB Output is correct
141 Correct 21 ms 5504 KB Output is correct
142 Correct 20 ms 5376 KB Output is correct
143 Correct 26 ms 5632 KB Output is correct
144 Correct 20 ms 5376 KB Output is correct
145 Correct 22 ms 5504 KB Output is correct
146 Correct 19 ms 5120 KB Output is correct
147 Correct 29 ms 6776 KB Output is correct
148 Correct 10 ms 4608 KB Output is correct
149 Correct 35 ms 7032 KB Output is correct
150 Correct 9 ms 4480 KB Output is correct
151 Correct 37 ms 7544 KB Output is correct
152 Correct 13 ms 4736 KB Output is correct
153 Correct 12 ms 4864 KB Output is correct
154 Correct 16 ms 5120 KB Output is correct
155 Correct 12 ms 4736 KB Output is correct
156 Correct 12 ms 4736 KB Output is correct
157 Correct 7 ms 4096 KB Output is correct
158 Correct 340 ms 4224 KB Output is correct
159 Correct 249 ms 4480 KB Output is correct
160 Correct 204 ms 4352 KB Output is correct
161 Correct 173 ms 4352 KB Output is correct
162 Correct 157 ms 4352 KB Output is correct
163 Correct 29 ms 5880 KB Output is correct
164 Correct 29 ms 5880 KB Output is correct
165 Correct 29 ms 5884 KB Output is correct
166 Correct 29 ms 5888 KB Output is correct
167 Correct 31 ms 5888 KB Output is correct
168 Correct 30 ms 5888 KB Output is correct
169 Correct 52 ms 8696 KB Output is correct
170 Correct 16 ms 4992 KB Output is correct
171 Correct 50 ms 8696 KB Output is correct
172 Correct 14 ms 4992 KB Output is correct
173 Correct 52 ms 8568 KB Output is correct
174 Correct 15 ms 4992 KB Output is correct
175 Correct 17 ms 5376 KB Output is correct
176 Correct 18 ms 5248 KB Output is correct
177 Correct 17 ms 5248 KB Output is correct
178 Correct 16 ms 5120 KB Output is correct
179 Correct 15 ms 4864 KB Output is correct
180 Correct 723 ms 4856 KB Output is correct
181 Correct 812 ms 5240 KB Output is correct
182 Correct 1020 ms 5624 KB Output is correct
183 Correct 506 ms 5112 KB Output is correct
184 Correct 410 ms 4992 KB Output is correct
185 Correct 47 ms 8056 KB Output is correct
186 Correct 42 ms 10104 KB Output is correct
187 Correct 59 ms 8952 KB Output is correct
188 Correct 60 ms 8088 KB Output is correct
189 Correct 56 ms 8312 KB Output is correct
190 Correct 50 ms 9464 KB Output is correct
191 Correct 59 ms 9336 KB Output is correct
192 Correct 39 ms 7416 KB Output is correct
193 Correct 41 ms 7032 KB Output is correct
194 Correct 22 ms 5376 KB Output is correct
195 Execution timed out 1582 ms 5496 KB Time limit exceeded
196 Halted 0 ms 0 KB -