답안 #292949

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
292949 2020-09-07T14:58:05 Z arnold518 벽 칠하기 (APIO20_paint) C++14
63 / 100
1500 ms 16320 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];

struct dequeue
{
	int pt=0;
	vector<int> V;
	void push_back(int x) { V.push_back(x); }
	void pop_back() { V.pop_back(); }
	void pop_front() { pt++; }
	int front() { return V[pt]; }
	int back() { return V.back(); }
	bool empty() { return pt==V.size(); }
};

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++;

	dequeue 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];
}

Compilation message

paint.cpp: In member function 'bool dequeue::empty()':
paint.cpp:31:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |  bool empty() { return pt==V.size(); }
      |                        ~~^~~~~~~~~~
# 결과 실행 시간 메모리 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 3968 KB Output is correct
14 Correct 3 ms 3968 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 29 ms 8184 KB Output is correct
24 Correct 30 ms 8192 KB Output is correct
25 Correct 6 ms 4352 KB Output is correct
26 Correct 6 ms 4352 KB Output is correct
27 Correct 6 ms 4224 KB Output is correct
28 Correct 6 ms 4096 KB Output is correct
29 Correct 6 ms 4224 KB Output is correct
30 Correct 6 ms 4096 KB Output is correct
31 Correct 13 ms 5248 KB Output is correct
32 Correct 14 ms 5248 KB Output is correct
33 Correct 14 ms 5248 KB Output is correct
34 Correct 14 ms 5248 KB Output is correct
35 Correct 13 ms 5248 KB Output is correct
36 Correct 14 ms 5280 KB Output is correct
37 Correct 38 ms 8696 KB Output is correct
38 Correct 41 ms 8704 KB Output is correct
39 Correct 48 ms 8824 KB Output is correct
40 Correct 20 ms 5884 KB Output is correct
41 Correct 14 ms 5120 KB Output is correct
42 Correct 23 ms 5376 KB Output is correct
43 Correct 13 ms 4864 KB Output is correct
44 Correct 16 ms 4736 KB Output is correct
45 Correct 25 ms 5368 KB Output is correct
46 Correct 73 ms 15396 KB Output is correct
47 Correct 42 ms 10232 KB Output is correct
48 Correct 47 ms 13432 KB Output is correct
49 Correct 67 ms 13560 KB Output is correct
50 Correct 75 ms 13048 KB Output is correct
51 Correct 53 ms 10360 KB Output is correct
52 Correct 18 ms 6012 KB Output is correct
53 Correct 18 ms 6012 KB Output is correct
54 Correct 19 ms 5376 KB Output is correct
55 Correct 21 ms 5376 KB Output is correct
56 Correct 18 ms 5376 KB Output is correct
57 Correct 18 ms 5376 KB Output is correct
58 Correct 73 ms 16120 KB Output is correct
59 Correct 82 ms 16120 KB Output is correct
60 Correct 73 ms 16320 KB Output is correct
61 Correct 75 ms 16248 KB Output is correct
62 Correct 74 ms 16120 KB Output is correct
63 Correct 71 ms 16248 KB Output is correct
64 Correct 81 ms 15352 KB Output is correct
65 Correct 95 ms 15352 KB Output is correct
66 Correct 92 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 3968 KB Output is correct
16 Correct 3 ms 3968 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 3 ms 3840 KB Output is correct
27 Correct 3 ms 3840 KB Output is correct
28 Correct 4 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 3 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 4 ms 3968 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 3968 KB Output is correct
57 Correct 3 ms 3840 KB Output is correct
58 Correct 3 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 3968 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 3968 KB Output is correct
16 Correct 3 ms 3968 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 29 ms 8184 KB Output is correct
26 Correct 30 ms 8192 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 4 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 3 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 4 ms 3968 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 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 3 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 3968 KB Output is correct
65 Correct 4 ms 3840 KB Output is correct
66 Correct 3 ms 3840 KB Output is correct
67 Correct 5 ms 3840 KB Output is correct
68 Correct 4 ms 3840 KB Output is correct
69 Correct 5 ms 3840 KB Output is correct
70 Correct 7 ms 4096 KB Output is correct
71 Correct 6 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 7 ms 4088 KB Output is correct
76 Correct 31 ms 6912 KB Output is correct
77 Correct 26 ms 7424 KB Output is correct
78 Correct 40 ms 7928 KB Output is correct
79 Correct 5 ms 3840 KB Output is correct
80 Correct 6 ms 3840 KB Output is correct
81 Correct 6 ms 3840 KB Output is correct
82 Correct 5 ms 3840 KB Output is correct
83 Correct 6 ms 3840 KB Output is correct
84 Correct 8 ms 4224 KB Output is correct
85 Correct 7 ms 4224 KB Output is correct
86 Correct 7 ms 4224 KB Output is correct
87 Correct 8 ms 4224 KB Output is correct
88 Correct 6 ms 4224 KB Output is correct
89 Correct 8 ms 4224 KB Output is correct
90 Correct 48 ms 8184 KB Output is correct
91 Correct 46 ms 8188 KB Output is correct
92 Correct 47 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 3968 KB Output is correct
16 Correct 3 ms 3968 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 29 ms 8184 KB Output is correct
26 Correct 30 ms 8192 KB Output is correct
27 Correct 6 ms 4352 KB Output is correct
28 Correct 6 ms 4352 KB Output is correct
29 Correct 6 ms 4224 KB Output is correct
30 Correct 6 ms 4096 KB Output is correct
31 Correct 6 ms 4224 KB Output is correct
32 Correct 6 ms 4096 KB Output is correct
33 Correct 13 ms 5248 KB Output is correct
34 Correct 14 ms 5248 KB Output is correct
35 Correct 14 ms 5248 KB Output is correct
36 Correct 14 ms 5248 KB Output is correct
37 Correct 13 ms 5248 KB Output is correct
38 Correct 14 ms 5280 KB Output is correct
39 Correct 38 ms 8696 KB Output is correct
40 Correct 41 ms 8704 KB Output is correct
41 Correct 48 ms 8824 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 4 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 3 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 4 ms 3968 KB Output is correct
69 Correct 3 ms 3840 KB Output is correct
70 Correct 3 ms 3840 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 3 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 3968 KB Output is correct
80 Correct 4 ms 3840 KB Output is correct
81 Correct 3 ms 3840 KB Output is correct
82 Correct 5 ms 3840 KB Output is correct
83 Correct 4 ms 3840 KB Output is correct
84 Correct 5 ms 3840 KB Output is correct
85 Correct 7 ms 4096 KB Output is correct
86 Correct 6 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 7 ms 4088 KB Output is correct
91 Correct 31 ms 6912 KB Output is correct
92 Correct 26 ms 7424 KB Output is correct
93 Correct 40 ms 7928 KB Output is correct
94 Correct 5 ms 3840 KB Output is correct
95 Correct 6 ms 3840 KB Output is correct
96 Correct 6 ms 3840 KB Output is correct
97 Correct 5 ms 3840 KB Output is correct
98 Correct 6 ms 3840 KB Output is correct
99 Correct 8 ms 4224 KB Output is correct
100 Correct 7 ms 4224 KB Output is correct
101 Correct 7 ms 4224 KB Output is correct
102 Correct 8 ms 4224 KB Output is correct
103 Correct 6 ms 4224 KB Output is correct
104 Correct 8 ms 4224 KB Output is correct
105 Correct 48 ms 8184 KB Output is correct
106 Correct 46 ms 8188 KB Output is correct
107 Correct 47 ms 8184 KB Output is correct
108 Correct 6 ms 4224 KB Output is correct
109 Correct 243 ms 4228 KB Output is correct
110 Correct 136 ms 4096 KB Output is correct
111 Correct 99 ms 4096 KB Output is correct
112 Correct 114 ms 4224 KB Output is correct
113 Correct 66 ms 4224 KB Output is correct
114 Correct 23 ms 5504 KB Output is correct
115 Correct 21 ms 5240 KB Output is correct
116 Correct 28 ms 5632 KB Output is correct
117 Correct 20 ms 5372 KB Output is correct
118 Correct 23 ms 5504 KB Output is correct
119 Correct 19 ms 5120 KB Output is correct
120 Correct 29 ms 6784 KB Output is correct
121 Correct 9 ms 4608 KB Output is correct
122 Correct 36 ms 7036 KB Output is correct
123 Correct 10 ms 4480 KB Output is correct
124 Correct 38 ms 7544 KB Output is correct
125 Correct 13 ms 4736 KB Output is correct
126 Correct 14 ms 4864 KB Output is correct
127 Correct 19 ms 5120 KB Output is correct
128 Correct 13 ms 4736 KB Output is correct
129 Correct 12 ms 4736 KB Output is correct
130 Correct 6 ms 4224 KB Output is correct
131 Correct 346 ms 4320 KB Output is correct
132 Correct 249 ms 4352 KB Output is correct
133 Correct 195 ms 4372 KB Output is correct
134 Correct 177 ms 4384 KB Output is correct
135 Correct 157 ms 4396 KB Output is correct
136 Correct 34 ms 5888 KB Output is correct
137 Correct 30 ms 5888 KB Output is correct
138 Correct 28 ms 5888 KB Output is correct
139 Correct 36 ms 5880 KB Output is correct
140 Correct 28 ms 5888 KB Output is correct
141 Correct 29 ms 5888 KB Output is correct
142 Correct 51 ms 8572 KB Output is correct
143 Correct 15 ms 4984 KB Output is correct
144 Correct 64 ms 8696 KB Output is correct
145 Correct 15 ms 4992 KB Output is correct
146 Correct 51 ms 8616 KB Output is correct
147 Correct 14 ms 4992 KB Output is correct
148 Correct 19 ms 5368 KB Output is correct
149 Correct 17 ms 5248 KB Output is correct
150 Correct 18 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 3968 KB Output is correct
16 Correct 3 ms 3968 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 29 ms 8184 KB Output is correct
26 Correct 30 ms 8192 KB Output is correct
27 Correct 6 ms 4352 KB Output is correct
28 Correct 6 ms 4352 KB Output is correct
29 Correct 6 ms 4224 KB Output is correct
30 Correct 6 ms 4096 KB Output is correct
31 Correct 6 ms 4224 KB Output is correct
32 Correct 6 ms 4096 KB Output is correct
33 Correct 13 ms 5248 KB Output is correct
34 Correct 14 ms 5248 KB Output is correct
35 Correct 14 ms 5248 KB Output is correct
36 Correct 14 ms 5248 KB Output is correct
37 Correct 13 ms 5248 KB Output is correct
38 Correct 14 ms 5280 KB Output is correct
39 Correct 38 ms 8696 KB Output is correct
40 Correct 41 ms 8704 KB Output is correct
41 Correct 48 ms 8824 KB Output is correct
42 Correct 20 ms 5884 KB Output is correct
43 Correct 14 ms 5120 KB Output is correct
44 Correct 23 ms 5376 KB Output is correct
45 Correct 13 ms 4864 KB Output is correct
46 Correct 16 ms 4736 KB Output is correct
47 Correct 25 ms 5368 KB Output is correct
48 Correct 73 ms 15396 KB Output is correct
49 Correct 42 ms 10232 KB Output is correct
50 Correct 47 ms 13432 KB Output is correct
51 Correct 67 ms 13560 KB Output is correct
52 Correct 75 ms 13048 KB Output is correct
53 Correct 53 ms 10360 KB Output is correct
54 Correct 18 ms 6012 KB Output is correct
55 Correct 18 ms 6012 KB Output is correct
56 Correct 19 ms 5376 KB Output is correct
57 Correct 21 ms 5376 KB Output is correct
58 Correct 18 ms 5376 KB Output is correct
59 Correct 18 ms 5376 KB Output is correct
60 Correct 73 ms 16120 KB Output is correct
61 Correct 82 ms 16120 KB Output is correct
62 Correct 73 ms 16320 KB Output is correct
63 Correct 75 ms 16248 KB Output is correct
64 Correct 74 ms 16120 KB Output is correct
65 Correct 71 ms 16248 KB Output is correct
66 Correct 81 ms 15352 KB Output is correct
67 Correct 95 ms 15352 KB Output is correct
68 Correct 92 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 3 ms 3840 KB Output is correct
72 Correct 3 ms 3840 KB Output is correct
73 Correct 4 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 3 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 4 ms 3968 KB Output is correct
96 Correct 3 ms 3840 KB Output is correct
97 Correct 3 ms 3840 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 3 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 3968 KB Output is correct
107 Correct 4 ms 3840 KB Output is correct
108 Correct 3 ms 3840 KB Output is correct
109 Correct 5 ms 3840 KB Output is correct
110 Correct 4 ms 3840 KB Output is correct
111 Correct 5 ms 3840 KB Output is correct
112 Correct 7 ms 4096 KB Output is correct
113 Correct 6 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 7 ms 4088 KB Output is correct
118 Correct 31 ms 6912 KB Output is correct
119 Correct 26 ms 7424 KB Output is correct
120 Correct 40 ms 7928 KB Output is correct
121 Correct 5 ms 3840 KB Output is correct
122 Correct 6 ms 3840 KB Output is correct
123 Correct 6 ms 3840 KB Output is correct
124 Correct 5 ms 3840 KB Output is correct
125 Correct 6 ms 3840 KB Output is correct
126 Correct 8 ms 4224 KB Output is correct
127 Correct 7 ms 4224 KB Output is correct
128 Correct 7 ms 4224 KB Output is correct
129 Correct 8 ms 4224 KB Output is correct
130 Correct 6 ms 4224 KB Output is correct
131 Correct 8 ms 4224 KB Output is correct
132 Correct 48 ms 8184 KB Output is correct
133 Correct 46 ms 8188 KB Output is correct
134 Correct 47 ms 8184 KB Output is correct
135 Correct 6 ms 4224 KB Output is correct
136 Correct 243 ms 4228 KB Output is correct
137 Correct 136 ms 4096 KB Output is correct
138 Correct 99 ms 4096 KB Output is correct
139 Correct 114 ms 4224 KB Output is correct
140 Correct 66 ms 4224 KB Output is correct
141 Correct 23 ms 5504 KB Output is correct
142 Correct 21 ms 5240 KB Output is correct
143 Correct 28 ms 5632 KB Output is correct
144 Correct 20 ms 5372 KB Output is correct
145 Correct 23 ms 5504 KB Output is correct
146 Correct 19 ms 5120 KB Output is correct
147 Correct 29 ms 6784 KB Output is correct
148 Correct 9 ms 4608 KB Output is correct
149 Correct 36 ms 7036 KB Output is correct
150 Correct 10 ms 4480 KB Output is correct
151 Correct 38 ms 7544 KB Output is correct
152 Correct 13 ms 4736 KB Output is correct
153 Correct 14 ms 4864 KB Output is correct
154 Correct 19 ms 5120 KB Output is correct
155 Correct 13 ms 4736 KB Output is correct
156 Correct 12 ms 4736 KB Output is correct
157 Correct 6 ms 4224 KB Output is correct
158 Correct 346 ms 4320 KB Output is correct
159 Correct 249 ms 4352 KB Output is correct
160 Correct 195 ms 4372 KB Output is correct
161 Correct 177 ms 4384 KB Output is correct
162 Correct 157 ms 4396 KB Output is correct
163 Correct 34 ms 5888 KB Output is correct
164 Correct 30 ms 5888 KB Output is correct
165 Correct 28 ms 5888 KB Output is correct
166 Correct 36 ms 5880 KB Output is correct
167 Correct 28 ms 5888 KB Output is correct
168 Correct 29 ms 5888 KB Output is correct
169 Correct 51 ms 8572 KB Output is correct
170 Correct 15 ms 4984 KB Output is correct
171 Correct 64 ms 8696 KB Output is correct
172 Correct 15 ms 4992 KB Output is correct
173 Correct 51 ms 8616 KB Output is correct
174 Correct 14 ms 4992 KB Output is correct
175 Correct 19 ms 5368 KB Output is correct
176 Correct 17 ms 5248 KB Output is correct
177 Correct 18 ms 5248 KB Output is correct
178 Correct 16 ms 5120 KB Output is correct
179 Correct 15 ms 5120 KB Output is correct
180 Correct 695 ms 4736 KB Output is correct
181 Correct 811 ms 5220 KB Output is correct
182 Correct 1004 ms 5504 KB Output is correct
183 Correct 493 ms 5112 KB Output is correct
184 Correct 404 ms 5112 KB Output is correct
185 Correct 57 ms 8056 KB Output is correct
186 Correct 41 ms 9976 KB Output is correct
187 Correct 61 ms 8824 KB Output is correct
188 Correct 45 ms 8056 KB Output is correct
189 Correct 61 ms 8312 KB Output is correct
190 Correct 53 ms 9584 KB Output is correct
191 Correct 54 ms 9336 KB Output is correct
192 Correct 44 ms 7368 KB Output is correct
193 Correct 40 ms 7040 KB Output is correct
194 Correct 24 ms 5760 KB Output is correct
195 Execution timed out 1579 ms 5496 KB Time limit exceeded
196 Halted 0 ms 0 KB -