답안 #741437

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
741437 2023-05-14T05:20:54 Z penguin133 벽 칠하기 (APIO20_paint) C++17
100 / 100
1108 ms 20544 KB
#include <bits/stdc++.h>
using namespace std;
 
//#include "paint.h"
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
 
bool ok[200005];
vector <int> brr[200005], grr[200005];
int dp[200005];
int stuf[200005];
 
int minimumInstructions(
    int N, int M, int K, std::vector<int> C,
    std::vector<int> A, std::vector<std::vector<int>> B) {
  for(int i=0;i<M;i++){
	  for(auto j : B[i])brr[j].push_back(i);
  }
  int cnt = 0;
  for(int i=0;i<M;i++)stuf[i] = M;
  for(int i=0;i<M-1;i++){
	for(auto j : brr[C[i]])stuf[(j - i + 1000 * M) % M]--;  
  }
  for(int i=M-1;i<N;i++){
	  for(auto j : brr[C[i]]){
		  stuf[(j - i + 1000 * M) % M]--;
		  int tmp = (j - i + 1000 * M)%M;
		  if(stuf[tmp] == 0)cnt++;
	  }
	  int rv = i - (M - 1) - 1;
	  if(rv >= 0){
		  for(auto j : brr[C[rv]]){
			  stuf[(j - rv + 1000 * M) % M]++;
			  int tmp = (j - rv + 1000 * M) % M;
			  if(stuf[tmp] == 1)cnt--;
		  }
	  }
	  if(cnt)ok[i] = 1;
  }
  for(int i = 0; i < M - 1; i++)dp[i] = 2e9;
  deque <pi> dq;
  dq.push_back({0, -1});
  for(int i=M - 1;i<N;i++){
	  dp[i] = 2e9;
	  //cout << ok[i] << ' ';
	  if(!dq.empty() && dq.front().se < i - M)dq.pop_front();
	  if(ok[i]){
		  dp[i] = (dq.empty() ? 2e9 : dq.front().fi) + 1;
	  }
	  while(!dq.empty() && dq.back().fi > dp[i])dq.pop_back();
	  dq.push_back({dp[i], i});
  }
  return (dp[N - 1] > N ? -1 : dp[N - 1]);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9704 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9688 KB Output is correct
15 Correct 5 ms 9700 KB Output is correct
16 Correct 5 ms 9752 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9692 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 21 ms 13592 KB Output is correct
23 Correct 27 ms 13552 KB Output is correct
24 Correct 24 ms 13524 KB Output is correct
25 Correct 7 ms 9940 KB Output is correct
26 Correct 7 ms 9940 KB Output is correct
27 Correct 8 ms 9940 KB Output is correct
28 Correct 8 ms 9940 KB Output is correct
29 Correct 8 ms 9916 KB Output is correct
30 Correct 8 ms 9940 KB Output is correct
31 Correct 17 ms 10836 KB Output is correct
32 Correct 15 ms 10836 KB Output is correct
33 Correct 15 ms 10788 KB Output is correct
34 Correct 14 ms 10824 KB Output is correct
35 Correct 15 ms 10812 KB Output is correct
36 Correct 13 ms 10836 KB Output is correct
37 Correct 28 ms 14008 KB Output is correct
38 Correct 33 ms 13940 KB Output is correct
39 Correct 26 ms 14040 KB Output is correct
40 Correct 16 ms 10836 KB Output is correct
41 Correct 11 ms 10324 KB Output is correct
42 Correct 16 ms 10876 KB Output is correct
43 Correct 12 ms 10452 KB Output is correct
44 Correct 12 ms 10452 KB Output is correct
45 Correct 15 ms 10900 KB Output is correct
46 Correct 41 ms 19644 KB Output is correct
47 Correct 31 ms 15172 KB Output is correct
48 Correct 31 ms 17748 KB Output is correct
49 Correct 39 ms 17964 KB Output is correct
50 Correct 40 ms 17612 KB Output is correct
51 Correct 39 ms 15236 KB Output is correct
52 Correct 18 ms 10880 KB Output is correct
53 Correct 18 ms 10872 KB Output is correct
54 Correct 20 ms 10964 KB Output is correct
55 Correct 16 ms 10964 KB Output is correct
56 Correct 16 ms 10964 KB Output is correct
57 Correct 16 ms 10836 KB Output is correct
58 Correct 54 ms 20472 KB Output is correct
59 Correct 47 ms 20476 KB Output is correct
60 Correct 49 ms 20428 KB Output is correct
61 Correct 54 ms 20452 KB Output is correct
62 Correct 47 ms 20464 KB Output is correct
63 Correct 48 ms 20520 KB Output is correct
64 Correct 53 ms 19532 KB Output is correct
65 Correct 55 ms 19640 KB Output is correct
66 Correct 60 ms 19568 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9704 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9688 KB Output is correct
15 Correct 5 ms 9700 KB Output is correct
16 Correct 5 ms 9752 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9692 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 7 ms 9684 KB Output is correct
26 Correct 5 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 6 ms 9720 KB Output is correct
29 Correct 5 ms 9680 KB Output is correct
30 Correct 6 ms 9724 KB Output is correct
31 Correct 6 ms 9684 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9704 KB Output is correct
34 Correct 6 ms 9684 KB Output is correct
35 Correct 5 ms 9684 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9724 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 5 ms 9684 KB Output is correct
41 Correct 5 ms 9616 KB Output is correct
42 Correct 6 ms 9748 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9708 KB Output is correct
45 Correct 6 ms 9684 KB Output is correct
46 Correct 5 ms 9680 KB Output is correct
47 Correct 5 ms 9684 KB Output is correct
48 Correct 5 ms 9724 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9752 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9740 KB Output is correct
55 Correct 6 ms 9684 KB Output is correct
56 Correct 8 ms 9684 KB Output is correct
57 Correct 5 ms 9684 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 6 ms 9684 KB Output is correct
60 Correct 5 ms 9684 KB Output is correct
61 Correct 6 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9704 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9688 KB Output is correct
17 Correct 5 ms 9700 KB Output is correct
18 Correct 5 ms 9752 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9692 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 21 ms 13592 KB Output is correct
25 Correct 27 ms 13552 KB Output is correct
26 Correct 24 ms 13524 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 7 ms 9684 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 6 ms 9720 KB Output is correct
32 Correct 5 ms 9680 KB Output is correct
33 Correct 6 ms 9724 KB Output is correct
34 Correct 6 ms 9684 KB Output is correct
35 Correct 5 ms 9684 KB Output is correct
36 Correct 5 ms 9704 KB Output is correct
37 Correct 6 ms 9684 KB Output is correct
38 Correct 5 ms 9684 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 5 ms 9684 KB Output is correct
41 Correct 6 ms 9724 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9616 KB Output is correct
45 Correct 6 ms 9748 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 5 ms 9708 KB Output is correct
48 Correct 6 ms 9684 KB Output is correct
49 Correct 5 ms 9680 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9724 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9752 KB Output is correct
56 Correct 5 ms 9684 KB Output is correct
57 Correct 5 ms 9740 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 8 ms 9684 KB Output is correct
60 Correct 5 ms 9684 KB Output is correct
61 Correct 6 ms 9684 KB Output is correct
62 Correct 6 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 6 ms 9684 KB Output is correct
65 Correct 6 ms 9684 KB Output is correct
66 Correct 5 ms 9684 KB Output is correct
67 Correct 7 ms 9688 KB Output is correct
68 Correct 6 ms 9684 KB Output is correct
69 Correct 6 ms 9684 KB Output is correct
70 Correct 7 ms 9812 KB Output is correct
71 Correct 6 ms 9812 KB Output is correct
72 Correct 7 ms 9900 KB Output is correct
73 Correct 6 ms 9728 KB Output is correct
74 Correct 6 ms 9812 KB Output is correct
75 Correct 6 ms 9812 KB Output is correct
76 Correct 22 ms 12372 KB Output is correct
77 Correct 20 ms 12756 KB Output is correct
78 Correct 24 ms 13204 KB Output is correct
79 Correct 6 ms 9740 KB Output is correct
80 Correct 6 ms 9692 KB Output is correct
81 Correct 7 ms 9644 KB Output is correct
82 Correct 6 ms 9684 KB Output is correct
83 Correct 7 ms 9684 KB Output is correct
84 Correct 7 ms 9940 KB Output is correct
85 Correct 7 ms 9940 KB Output is correct
86 Correct 7 ms 9940 KB Output is correct
87 Correct 8 ms 9940 KB Output is correct
88 Correct 8 ms 9836 KB Output is correct
89 Correct 8 ms 9940 KB Output is correct
90 Correct 32 ms 13388 KB Output is correct
91 Correct 29 ms 13444 KB Output is correct
92 Correct 29 ms 13428 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9704 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9688 KB Output is correct
17 Correct 5 ms 9700 KB Output is correct
18 Correct 5 ms 9752 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9692 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 21 ms 13592 KB Output is correct
25 Correct 27 ms 13552 KB Output is correct
26 Correct 24 ms 13524 KB Output is correct
27 Correct 7 ms 9940 KB Output is correct
28 Correct 7 ms 9940 KB Output is correct
29 Correct 8 ms 9940 KB Output is correct
30 Correct 8 ms 9940 KB Output is correct
31 Correct 8 ms 9916 KB Output is correct
32 Correct 8 ms 9940 KB Output is correct
33 Correct 17 ms 10836 KB Output is correct
34 Correct 15 ms 10836 KB Output is correct
35 Correct 15 ms 10788 KB Output is correct
36 Correct 14 ms 10824 KB Output is correct
37 Correct 15 ms 10812 KB Output is correct
38 Correct 13 ms 10836 KB Output is correct
39 Correct 28 ms 14008 KB Output is correct
40 Correct 33 ms 13940 KB Output is correct
41 Correct 26 ms 14040 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 7 ms 9684 KB Output is correct
44 Correct 5 ms 9684 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 6 ms 9720 KB Output is correct
47 Correct 5 ms 9680 KB Output is correct
48 Correct 6 ms 9724 KB Output is correct
49 Correct 6 ms 9684 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9704 KB Output is correct
52 Correct 6 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9684 KB Output is correct
56 Correct 6 ms 9724 KB Output is correct
57 Correct 5 ms 9684 KB Output is correct
58 Correct 5 ms 9684 KB Output is correct
59 Correct 5 ms 9616 KB Output is correct
60 Correct 6 ms 9748 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 5 ms 9708 KB Output is correct
63 Correct 6 ms 9684 KB Output is correct
64 Correct 5 ms 9680 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 5 ms 9724 KB Output is correct
67 Correct 5 ms 9684 KB Output is correct
68 Correct 5 ms 9684 KB Output is correct
69 Correct 5 ms 9684 KB Output is correct
70 Correct 5 ms 9752 KB Output is correct
71 Correct 5 ms 9684 KB Output is correct
72 Correct 5 ms 9740 KB Output is correct
73 Correct 6 ms 9684 KB Output is correct
74 Correct 8 ms 9684 KB Output is correct
75 Correct 5 ms 9684 KB Output is correct
76 Correct 6 ms 9684 KB Output is correct
77 Correct 6 ms 9684 KB Output is correct
78 Correct 5 ms 9684 KB Output is correct
79 Correct 6 ms 9684 KB Output is correct
80 Correct 6 ms 9684 KB Output is correct
81 Correct 5 ms 9684 KB Output is correct
82 Correct 7 ms 9688 KB Output is correct
83 Correct 6 ms 9684 KB Output is correct
84 Correct 6 ms 9684 KB Output is correct
85 Correct 7 ms 9812 KB Output is correct
86 Correct 6 ms 9812 KB Output is correct
87 Correct 7 ms 9900 KB Output is correct
88 Correct 6 ms 9728 KB Output is correct
89 Correct 6 ms 9812 KB Output is correct
90 Correct 6 ms 9812 KB Output is correct
91 Correct 22 ms 12372 KB Output is correct
92 Correct 20 ms 12756 KB Output is correct
93 Correct 24 ms 13204 KB Output is correct
94 Correct 6 ms 9740 KB Output is correct
95 Correct 6 ms 9692 KB Output is correct
96 Correct 7 ms 9644 KB Output is correct
97 Correct 6 ms 9684 KB Output is correct
98 Correct 7 ms 9684 KB Output is correct
99 Correct 7 ms 9940 KB Output is correct
100 Correct 7 ms 9940 KB Output is correct
101 Correct 7 ms 9940 KB Output is correct
102 Correct 8 ms 9940 KB Output is correct
103 Correct 8 ms 9836 KB Output is correct
104 Correct 8 ms 9940 KB Output is correct
105 Correct 32 ms 13388 KB Output is correct
106 Correct 29 ms 13444 KB Output is correct
107 Correct 29 ms 13428 KB Output is correct
108 Correct 10 ms 9904 KB Output is correct
109 Correct 156 ms 9892 KB Output is correct
110 Correct 87 ms 9860 KB Output is correct
111 Correct 70 ms 9880 KB Output is correct
112 Correct 76 ms 9912 KB Output is correct
113 Correct 51 ms 9932 KB Output is correct
114 Correct 16 ms 10964 KB Output is correct
115 Correct 16 ms 10884 KB Output is correct
116 Correct 19 ms 11092 KB Output is correct
117 Correct 16 ms 10920 KB Output is correct
118 Correct 18 ms 10964 KB Output is correct
119 Correct 15 ms 10728 KB Output is correct
120 Correct 23 ms 12244 KB Output is correct
121 Correct 11 ms 10324 KB Output is correct
122 Correct 28 ms 12492 KB Output is correct
123 Correct 9 ms 10132 KB Output is correct
124 Correct 27 ms 12880 KB Output is correct
125 Correct 11 ms 10452 KB Output is correct
126 Correct 11 ms 10452 KB Output is correct
127 Correct 13 ms 10708 KB Output is correct
128 Correct 11 ms 10476 KB Output is correct
129 Correct 11 ms 10452 KB Output is correct
130 Correct 7 ms 9960 KB Output is correct
131 Correct 224 ms 9952 KB Output is correct
132 Correct 160 ms 9948 KB Output is correct
133 Correct 133 ms 9976 KB Output is correct
134 Correct 117 ms 9976 KB Output is correct
135 Correct 103 ms 9988 KB Output is correct
136 Correct 22 ms 11348 KB Output is correct
137 Correct 23 ms 11304 KB Output is correct
138 Correct 20 ms 11392 KB Output is correct
139 Correct 21 ms 11340 KB Output is correct
140 Correct 22 ms 11348 KB Output is correct
141 Correct 23 ms 11348 KB Output is correct
142 Correct 35 ms 13820 KB Output is correct
143 Correct 12 ms 10676 KB Output is correct
144 Correct 35 ms 13772 KB Output is correct
145 Correct 12 ms 10600 KB Output is correct
146 Correct 34 ms 13772 KB Output is correct
147 Correct 17 ms 10568 KB Output is correct
148 Correct 15 ms 10964 KB Output is correct
149 Correct 17 ms 10848 KB Output is correct
150 Correct 16 ms 10808 KB Output is correct
151 Correct 13 ms 10836 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9704 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9688 KB Output is correct
17 Correct 5 ms 9700 KB Output is correct
18 Correct 5 ms 9752 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9692 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 21 ms 13592 KB Output is correct
25 Correct 27 ms 13552 KB Output is correct
26 Correct 24 ms 13524 KB Output is correct
27 Correct 7 ms 9940 KB Output is correct
28 Correct 7 ms 9940 KB Output is correct
29 Correct 8 ms 9940 KB Output is correct
30 Correct 8 ms 9940 KB Output is correct
31 Correct 8 ms 9916 KB Output is correct
32 Correct 8 ms 9940 KB Output is correct
33 Correct 17 ms 10836 KB Output is correct
34 Correct 15 ms 10836 KB Output is correct
35 Correct 15 ms 10788 KB Output is correct
36 Correct 14 ms 10824 KB Output is correct
37 Correct 15 ms 10812 KB Output is correct
38 Correct 13 ms 10836 KB Output is correct
39 Correct 28 ms 14008 KB Output is correct
40 Correct 33 ms 13940 KB Output is correct
41 Correct 26 ms 14040 KB Output is correct
42 Correct 16 ms 10836 KB Output is correct
43 Correct 11 ms 10324 KB Output is correct
44 Correct 16 ms 10876 KB Output is correct
45 Correct 12 ms 10452 KB Output is correct
46 Correct 12 ms 10452 KB Output is correct
47 Correct 15 ms 10900 KB Output is correct
48 Correct 41 ms 19644 KB Output is correct
49 Correct 31 ms 15172 KB Output is correct
50 Correct 31 ms 17748 KB Output is correct
51 Correct 39 ms 17964 KB Output is correct
52 Correct 40 ms 17612 KB Output is correct
53 Correct 39 ms 15236 KB Output is correct
54 Correct 18 ms 10880 KB Output is correct
55 Correct 18 ms 10872 KB Output is correct
56 Correct 20 ms 10964 KB Output is correct
57 Correct 16 ms 10964 KB Output is correct
58 Correct 16 ms 10964 KB Output is correct
59 Correct 16 ms 10836 KB Output is correct
60 Correct 54 ms 20472 KB Output is correct
61 Correct 47 ms 20476 KB Output is correct
62 Correct 49 ms 20428 KB Output is correct
63 Correct 54 ms 20452 KB Output is correct
64 Correct 47 ms 20464 KB Output is correct
65 Correct 48 ms 20520 KB Output is correct
66 Correct 53 ms 19532 KB Output is correct
67 Correct 55 ms 19640 KB Output is correct
68 Correct 60 ms 19568 KB Output is correct
69 Correct 5 ms 9684 KB Output is correct
70 Correct 7 ms 9684 KB Output is correct
71 Correct 5 ms 9684 KB Output is correct
72 Correct 5 ms 9684 KB Output is correct
73 Correct 6 ms 9720 KB Output is correct
74 Correct 5 ms 9680 KB Output is correct
75 Correct 6 ms 9724 KB Output is correct
76 Correct 6 ms 9684 KB Output is correct
77 Correct 5 ms 9684 KB Output is correct
78 Correct 5 ms 9704 KB Output is correct
79 Correct 6 ms 9684 KB Output is correct
80 Correct 5 ms 9684 KB Output is correct
81 Correct 5 ms 9684 KB Output is correct
82 Correct 5 ms 9684 KB Output is correct
83 Correct 6 ms 9724 KB Output is correct
84 Correct 5 ms 9684 KB Output is correct
85 Correct 5 ms 9684 KB Output is correct
86 Correct 5 ms 9616 KB Output is correct
87 Correct 6 ms 9748 KB Output is correct
88 Correct 5 ms 9684 KB Output is correct
89 Correct 5 ms 9708 KB Output is correct
90 Correct 6 ms 9684 KB Output is correct
91 Correct 5 ms 9680 KB Output is correct
92 Correct 5 ms 9684 KB Output is correct
93 Correct 5 ms 9724 KB Output is correct
94 Correct 5 ms 9684 KB Output is correct
95 Correct 5 ms 9684 KB Output is correct
96 Correct 5 ms 9684 KB Output is correct
97 Correct 5 ms 9752 KB Output is correct
98 Correct 5 ms 9684 KB Output is correct
99 Correct 5 ms 9740 KB Output is correct
100 Correct 6 ms 9684 KB Output is correct
101 Correct 8 ms 9684 KB Output is correct
102 Correct 5 ms 9684 KB Output is correct
103 Correct 6 ms 9684 KB Output is correct
104 Correct 6 ms 9684 KB Output is correct
105 Correct 5 ms 9684 KB Output is correct
106 Correct 6 ms 9684 KB Output is correct
107 Correct 6 ms 9684 KB Output is correct
108 Correct 5 ms 9684 KB Output is correct
109 Correct 7 ms 9688 KB Output is correct
110 Correct 6 ms 9684 KB Output is correct
111 Correct 6 ms 9684 KB Output is correct
112 Correct 7 ms 9812 KB Output is correct
113 Correct 6 ms 9812 KB Output is correct
114 Correct 7 ms 9900 KB Output is correct
115 Correct 6 ms 9728 KB Output is correct
116 Correct 6 ms 9812 KB Output is correct
117 Correct 6 ms 9812 KB Output is correct
118 Correct 22 ms 12372 KB Output is correct
119 Correct 20 ms 12756 KB Output is correct
120 Correct 24 ms 13204 KB Output is correct
121 Correct 6 ms 9740 KB Output is correct
122 Correct 6 ms 9692 KB Output is correct
123 Correct 7 ms 9644 KB Output is correct
124 Correct 6 ms 9684 KB Output is correct
125 Correct 7 ms 9684 KB Output is correct
126 Correct 7 ms 9940 KB Output is correct
127 Correct 7 ms 9940 KB Output is correct
128 Correct 7 ms 9940 KB Output is correct
129 Correct 8 ms 9940 KB Output is correct
130 Correct 8 ms 9836 KB Output is correct
131 Correct 8 ms 9940 KB Output is correct
132 Correct 32 ms 13388 KB Output is correct
133 Correct 29 ms 13444 KB Output is correct
134 Correct 29 ms 13428 KB Output is correct
135 Correct 10 ms 9904 KB Output is correct
136 Correct 156 ms 9892 KB Output is correct
137 Correct 87 ms 9860 KB Output is correct
138 Correct 70 ms 9880 KB Output is correct
139 Correct 76 ms 9912 KB Output is correct
140 Correct 51 ms 9932 KB Output is correct
141 Correct 16 ms 10964 KB Output is correct
142 Correct 16 ms 10884 KB Output is correct
143 Correct 19 ms 11092 KB Output is correct
144 Correct 16 ms 10920 KB Output is correct
145 Correct 18 ms 10964 KB Output is correct
146 Correct 15 ms 10728 KB Output is correct
147 Correct 23 ms 12244 KB Output is correct
148 Correct 11 ms 10324 KB Output is correct
149 Correct 28 ms 12492 KB Output is correct
150 Correct 9 ms 10132 KB Output is correct
151 Correct 27 ms 12880 KB Output is correct
152 Correct 11 ms 10452 KB Output is correct
153 Correct 11 ms 10452 KB Output is correct
154 Correct 13 ms 10708 KB Output is correct
155 Correct 11 ms 10476 KB Output is correct
156 Correct 11 ms 10452 KB Output is correct
157 Correct 7 ms 9960 KB Output is correct
158 Correct 224 ms 9952 KB Output is correct
159 Correct 160 ms 9948 KB Output is correct
160 Correct 133 ms 9976 KB Output is correct
161 Correct 117 ms 9976 KB Output is correct
162 Correct 103 ms 9988 KB Output is correct
163 Correct 22 ms 11348 KB Output is correct
164 Correct 23 ms 11304 KB Output is correct
165 Correct 20 ms 11392 KB Output is correct
166 Correct 21 ms 11340 KB Output is correct
167 Correct 22 ms 11348 KB Output is correct
168 Correct 23 ms 11348 KB Output is correct
169 Correct 35 ms 13820 KB Output is correct
170 Correct 12 ms 10676 KB Output is correct
171 Correct 35 ms 13772 KB Output is correct
172 Correct 12 ms 10600 KB Output is correct
173 Correct 34 ms 13772 KB Output is correct
174 Correct 17 ms 10568 KB Output is correct
175 Correct 15 ms 10964 KB Output is correct
176 Correct 17 ms 10848 KB Output is correct
177 Correct 16 ms 10808 KB Output is correct
178 Correct 13 ms 10836 KB Output is correct
179 Correct 12 ms 10452 KB Output is correct
180 Correct 428 ms 10340 KB Output is correct
181 Correct 498 ms 10640 KB Output is correct
182 Correct 618 ms 10980 KB Output is correct
183 Correct 306 ms 10608 KB Output is correct
184 Correct 254 ms 10600 KB Output is correct
185 Correct 32 ms 13268 KB Output is correct
186 Correct 32 ms 15068 KB Output is correct
187 Correct 36 ms 13900 KB Output is correct
188 Correct 37 ms 13432 KB Output is correct
189 Correct 37 ms 13536 KB Output is correct
190 Correct 41 ms 14664 KB Output is correct
191 Correct 35 ms 14412 KB Output is correct
192 Correct 36 ms 12788 KB Output is correct
193 Correct 30 ms 12408 KB Output is correct
194 Correct 17 ms 10876 KB Output is correct
195 Correct 1108 ms 11056 KB Output is correct
196 Correct 774 ms 11084 KB Output is correct
197 Correct 640 ms 11092 KB Output is correct
198 Correct 548 ms 11084 KB Output is correct
199 Correct 522 ms 11068 KB Output is correct
200 Correct 79 ms 20516 KB Output is correct
201 Correct 76 ms 20544 KB Output is correct
202 Correct 63 ms 20496 KB Output is correct
203 Correct 68 ms 20432 KB Output is correct
204 Correct 65 ms 20456 KB Output is correct
205 Correct 64 ms 20448 KB Output is correct
206 Correct 57 ms 19576 KB Output is correct
207 Correct 51 ms 19316 KB Output is correct
208 Correct 65 ms 19632 KB Output is correct
209 Correct 51 ms 19352 KB Output is correct
210 Correct 63 ms 19636 KB Output is correct
211 Correct 60 ms 19404 KB Output is correct
212 Correct 59 ms 20244 KB Output is correct
213 Correct 54 ms 17240 KB Output is correct
214 Correct 50 ms 16700 KB Output is correct
215 Correct 58 ms 16376 KB Output is correct