답안 #741436

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
741436 2023-05-14T05:17:14 Z penguin133 벽 칠하기 (APIO20_paint) C++17
100 / 100
1134 ms 22376 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);
  }
  set <int> ms;
  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)ms.insert(tmp);
	  }
	  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)ms.erase(tmp);
		  }
	  }
	  if(!ms.empty())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 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 4 ms 9684 KB Output is correct
5 Correct 4 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 7 ms 9684 KB Output is correct
9 Correct 7 ms 9672 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9624 KB Output is correct
12 Correct 6 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 9684 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 6 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 22 ms 13648 KB Output is correct
23 Correct 23 ms 13524 KB Output is correct
24 Correct 21 ms 13556 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 7 ms 9940 KB Output is correct
30 Correct 7 ms 9940 KB Output is correct
31 Correct 12 ms 10836 KB Output is correct
32 Correct 14 ms 10808 KB Output is correct
33 Correct 13 ms 10808 KB Output is correct
34 Correct 14 ms 10940 KB Output is correct
35 Correct 13 ms 10864 KB Output is correct
36 Correct 13 ms 10916 KB Output is correct
37 Correct 29 ms 14028 KB Output is correct
38 Correct 26 ms 14044 KB Output is correct
39 Correct 30 ms 14004 KB Output is correct
40 Correct 18 ms 10820 KB Output is correct
41 Correct 12 ms 10324 KB Output is correct
42 Correct 18 ms 10872 KB Output is correct
43 Correct 13 ms 10524 KB Output is correct
44 Correct 12 ms 10460 KB Output is correct
45 Correct 16 ms 10924 KB Output is correct
46 Correct 42 ms 19636 KB Output is correct
47 Correct 32 ms 16076 KB Output is correct
48 Correct 34 ms 18412 KB Output is correct
49 Correct 42 ms 18856 KB Output is correct
50 Correct 42 ms 18636 KB Output is correct
51 Correct 37 ms 16112 KB Output is correct
52 Correct 19 ms 11092 KB Output is correct
53 Correct 18 ms 11092 KB Output is correct
54 Correct 19 ms 11128 KB Output is correct
55 Correct 18 ms 11128 KB Output is correct
56 Correct 17 ms 11064 KB Output is correct
57 Correct 17 ms 11056 KB Output is correct
58 Correct 50 ms 21696 KB Output is correct
59 Correct 50 ms 21704 KB Output is correct
60 Correct 50 ms 21700 KB Output is correct
61 Correct 53 ms 21708 KB Output is correct
62 Correct 55 ms 21744 KB Output is correct
63 Correct 57 ms 21692 KB Output is correct
64 Correct 65 ms 20864 KB Output is correct
65 Correct 56 ms 20844 KB Output is correct
66 Correct 53 ms 20840 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 9684 KB Output is correct
4 Correct 4 ms 9684 KB Output is correct
5 Correct 4 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 7 ms 9684 KB Output is correct
9 Correct 7 ms 9672 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9624 KB Output is correct
12 Correct 6 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 9684 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 6 ms 9684 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 6 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 7 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 5 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 7 ms 9684 KB Output is correct
32 Correct 6 ms 9616 KB Output is correct
33 Correct 8 ms 9700 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 6 ms 9684 KB Output is correct
38 Correct 6 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 5 ms 9684 KB Output is correct
42 Correct 5 ms 9744 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9684 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 6 ms 9684 KB Output is correct
48 Correct 5 ms 9684 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 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 6 ms 9684 KB Output is correct
54 Correct 6 ms 9672 KB Output is correct
55 Correct 6 ms 9684 KB Output is correct
56 Correct 5 ms 9684 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 9684 KB Output is correct
60 Correct 5 ms 9684 KB Output is correct
61 Correct 5 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 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 4 ms 9684 KB Output is correct
7 Correct 4 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 7 ms 9684 KB Output is correct
11 Correct 7 ms 9672 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9624 KB Output is correct
14 Correct 6 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 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 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 6 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 22 ms 13648 KB Output is correct
25 Correct 23 ms 13524 KB Output is correct
26 Correct 21 ms 13556 KB Output is correct
27 Correct 6 ms 9684 KB Output is correct
28 Correct 5 ms 9684 KB Output is correct
29 Correct 7 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 5 ms 9684 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9684 KB Output is correct
34 Correct 7 ms 9684 KB Output is correct
35 Correct 6 ms 9616 KB Output is correct
36 Correct 8 ms 9700 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 6 ms 9684 KB Output is correct
41 Correct 6 ms 9684 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 9684 KB Output is correct
45 Correct 5 ms 9744 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 6 ms 9684 KB Output is correct
51 Correct 5 ms 9684 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 9684 KB Output is correct
57 Correct 6 ms 9672 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 5 ms 9684 KB Output is correct
60 Correct 5 ms 9684 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 5 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 7 ms 9684 KB Output is correct
66 Correct 6 ms 9684 KB Output is correct
67 Correct 6 ms 9684 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 9 ms 9812 KB Output is correct
72 Correct 6 ms 9844 KB Output is correct
73 Correct 6 ms 9812 KB Output is correct
74 Correct 6 ms 9876 KB Output is correct
75 Correct 6 ms 9804 KB Output is correct
76 Correct 21 ms 12264 KB Output is correct
77 Correct 24 ms 12748 KB Output is correct
78 Correct 26 ms 13140 KB Output is correct
79 Correct 6 ms 9684 KB Output is correct
80 Correct 7 ms 9684 KB Output is correct
81 Correct 7 ms 9684 KB Output is correct
82 Correct 8 ms 9684 KB Output is correct
83 Correct 7 ms 9684 KB Output is correct
84 Correct 7 ms 9868 KB Output is correct
85 Correct 7 ms 9936 KB Output is correct
86 Correct 7 ms 9884 KB Output is correct
87 Correct 6 ms 9940 KB Output is correct
88 Correct 7 ms 9940 KB Output is correct
89 Correct 7 ms 9940 KB Output is correct
90 Correct 33 ms 13416 KB Output is correct
91 Correct 30 ms 13388 KB Output is correct
92 Correct 40 ms 13452 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 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 4 ms 9684 KB Output is correct
7 Correct 4 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 7 ms 9684 KB Output is correct
11 Correct 7 ms 9672 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9624 KB Output is correct
14 Correct 6 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 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 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 6 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 22 ms 13648 KB Output is correct
25 Correct 23 ms 13524 KB Output is correct
26 Correct 21 ms 13556 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 7 ms 9940 KB Output is correct
32 Correct 7 ms 9940 KB Output is correct
33 Correct 12 ms 10836 KB Output is correct
34 Correct 14 ms 10808 KB Output is correct
35 Correct 13 ms 10808 KB Output is correct
36 Correct 14 ms 10940 KB Output is correct
37 Correct 13 ms 10864 KB Output is correct
38 Correct 13 ms 10916 KB Output is correct
39 Correct 29 ms 14028 KB Output is correct
40 Correct 26 ms 14044 KB Output is correct
41 Correct 30 ms 14004 KB Output is correct
42 Correct 6 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 7 ms 9684 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 5 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 7 ms 9684 KB Output is correct
50 Correct 6 ms 9616 KB Output is correct
51 Correct 8 ms 9700 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 6 ms 9684 KB Output is correct
56 Correct 6 ms 9684 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 9684 KB Output is correct
60 Correct 5 ms 9744 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 4 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 5 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 6 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 9684 KB Output is correct
71 Correct 6 ms 9684 KB Output is correct
72 Correct 6 ms 9672 KB Output is correct
73 Correct 6 ms 9684 KB Output is correct
74 Correct 5 ms 9684 KB Output is correct
75 Correct 5 ms 9684 KB Output is correct
76 Correct 5 ms 9684 KB Output is correct
77 Correct 5 ms 9684 KB Output is correct
78 Correct 5 ms 9684 KB Output is correct
79 Correct 5 ms 9684 KB Output is correct
80 Correct 7 ms 9684 KB Output is correct
81 Correct 6 ms 9684 KB Output is correct
82 Correct 6 ms 9684 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 9 ms 9812 KB Output is correct
87 Correct 6 ms 9844 KB Output is correct
88 Correct 6 ms 9812 KB Output is correct
89 Correct 6 ms 9876 KB Output is correct
90 Correct 6 ms 9804 KB Output is correct
91 Correct 21 ms 12264 KB Output is correct
92 Correct 24 ms 12748 KB Output is correct
93 Correct 26 ms 13140 KB Output is correct
94 Correct 6 ms 9684 KB Output is correct
95 Correct 7 ms 9684 KB Output is correct
96 Correct 7 ms 9684 KB Output is correct
97 Correct 8 ms 9684 KB Output is correct
98 Correct 7 ms 9684 KB Output is correct
99 Correct 7 ms 9868 KB Output is correct
100 Correct 7 ms 9936 KB Output is correct
101 Correct 7 ms 9884 KB Output is correct
102 Correct 6 ms 9940 KB Output is correct
103 Correct 7 ms 9940 KB Output is correct
104 Correct 7 ms 9940 KB Output is correct
105 Correct 33 ms 13416 KB Output is correct
106 Correct 30 ms 13388 KB Output is correct
107 Correct 40 ms 13452 KB Output is correct
108 Correct 8 ms 9904 KB Output is correct
109 Correct 167 ms 9920 KB Output is correct
110 Correct 96 ms 9864 KB Output is correct
111 Correct 72 ms 9880 KB Output is correct
112 Correct 86 ms 9928 KB Output is correct
113 Correct 55 ms 9932 KB Output is correct
114 Correct 17 ms 10964 KB Output is correct
115 Correct 17 ms 10828 KB Output is correct
116 Correct 20 ms 11092 KB Output is correct
117 Correct 16 ms 10964 KB Output is correct
118 Correct 18 ms 11024 KB Output is correct
119 Correct 16 ms 10728 KB Output is correct
120 Correct 24 ms 12168 KB Output is correct
121 Correct 12 ms 10260 KB Output is correct
122 Correct 27 ms 12400 KB Output is correct
123 Correct 10 ms 10196 KB Output is correct
124 Correct 29 ms 12888 KB Output is correct
125 Correct 12 ms 10452 KB Output is correct
126 Correct 11 ms 10452 KB Output is correct
127 Correct 14 ms 10720 KB Output is correct
128 Correct 12 ms 10452 KB Output is correct
129 Correct 11 ms 10452 KB Output is correct
130 Correct 8 ms 9964 KB Output is correct
131 Correct 227 ms 9960 KB Output is correct
132 Correct 161 ms 10060 KB Output is correct
133 Correct 133 ms 10104 KB Output is correct
134 Correct 120 ms 9988 KB Output is correct
135 Correct 106 ms 10004 KB Output is correct
136 Correct 22 ms 11408 KB Output is correct
137 Correct 22 ms 11396 KB Output is correct
138 Correct 22 ms 11340 KB Output is correct
139 Correct 22 ms 11276 KB Output is correct
140 Correct 22 ms 11308 KB Output is correct
141 Correct 22 ms 11288 KB Output is correct
142 Correct 38 ms 13908 KB Output is correct
143 Correct 12 ms 10612 KB Output is correct
144 Correct 34 ms 13740 KB Output is correct
145 Correct 12 ms 10688 KB Output is correct
146 Correct 34 ms 13752 KB Output is correct
147 Correct 12 ms 10680 KB Output is correct
148 Correct 15 ms 10984 KB Output is correct
149 Correct 15 ms 10836 KB Output is correct
150 Correct 14 ms 10856 KB Output is correct
151 Correct 14 ms 10808 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 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 4 ms 9684 KB Output is correct
7 Correct 4 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 7 ms 9684 KB Output is correct
11 Correct 7 ms 9672 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9624 KB Output is correct
14 Correct 6 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 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 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 6 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 22 ms 13648 KB Output is correct
25 Correct 23 ms 13524 KB Output is correct
26 Correct 21 ms 13556 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 7 ms 9940 KB Output is correct
32 Correct 7 ms 9940 KB Output is correct
33 Correct 12 ms 10836 KB Output is correct
34 Correct 14 ms 10808 KB Output is correct
35 Correct 13 ms 10808 KB Output is correct
36 Correct 14 ms 10940 KB Output is correct
37 Correct 13 ms 10864 KB Output is correct
38 Correct 13 ms 10916 KB Output is correct
39 Correct 29 ms 14028 KB Output is correct
40 Correct 26 ms 14044 KB Output is correct
41 Correct 30 ms 14004 KB Output is correct
42 Correct 18 ms 10820 KB Output is correct
43 Correct 12 ms 10324 KB Output is correct
44 Correct 18 ms 10872 KB Output is correct
45 Correct 13 ms 10524 KB Output is correct
46 Correct 12 ms 10460 KB Output is correct
47 Correct 16 ms 10924 KB Output is correct
48 Correct 42 ms 19636 KB Output is correct
49 Correct 32 ms 16076 KB Output is correct
50 Correct 34 ms 18412 KB Output is correct
51 Correct 42 ms 18856 KB Output is correct
52 Correct 42 ms 18636 KB Output is correct
53 Correct 37 ms 16112 KB Output is correct
54 Correct 19 ms 11092 KB Output is correct
55 Correct 18 ms 11092 KB Output is correct
56 Correct 19 ms 11128 KB Output is correct
57 Correct 18 ms 11128 KB Output is correct
58 Correct 17 ms 11064 KB Output is correct
59 Correct 17 ms 11056 KB Output is correct
60 Correct 50 ms 21696 KB Output is correct
61 Correct 50 ms 21704 KB Output is correct
62 Correct 50 ms 21700 KB Output is correct
63 Correct 53 ms 21708 KB Output is correct
64 Correct 55 ms 21744 KB Output is correct
65 Correct 57 ms 21692 KB Output is correct
66 Correct 65 ms 20864 KB Output is correct
67 Correct 56 ms 20844 KB Output is correct
68 Correct 53 ms 20840 KB Output is correct
69 Correct 6 ms 9684 KB Output is correct
70 Correct 5 ms 9684 KB Output is correct
71 Correct 7 ms 9684 KB Output is correct
72 Correct 5 ms 9684 KB Output is correct
73 Correct 5 ms 9684 KB Output is correct
74 Correct 5 ms 9684 KB Output is correct
75 Correct 5 ms 9684 KB Output is correct
76 Correct 7 ms 9684 KB Output is correct
77 Correct 6 ms 9616 KB Output is correct
78 Correct 8 ms 9700 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 6 ms 9684 KB Output is correct
83 Correct 6 ms 9684 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 9684 KB Output is correct
87 Correct 5 ms 9744 KB Output is correct
88 Correct 5 ms 9684 KB Output is correct
89 Correct 4 ms 9684 KB Output is correct
90 Correct 5 ms 9684 KB Output is correct
91 Correct 5 ms 9684 KB Output is correct
92 Correct 6 ms 9684 KB Output is correct
93 Correct 5 ms 9684 KB Output is correct
94 Correct 6 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 9684 KB Output is correct
98 Correct 6 ms 9684 KB Output is correct
99 Correct 6 ms 9672 KB Output is correct
100 Correct 6 ms 9684 KB Output is correct
101 Correct 5 ms 9684 KB Output is correct
102 Correct 5 ms 9684 KB Output is correct
103 Correct 5 ms 9684 KB Output is correct
104 Correct 5 ms 9684 KB Output is correct
105 Correct 5 ms 9684 KB Output is correct
106 Correct 5 ms 9684 KB Output is correct
107 Correct 7 ms 9684 KB Output is correct
108 Correct 6 ms 9684 KB Output is correct
109 Correct 6 ms 9684 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 9 ms 9812 KB Output is correct
114 Correct 6 ms 9844 KB Output is correct
115 Correct 6 ms 9812 KB Output is correct
116 Correct 6 ms 9876 KB Output is correct
117 Correct 6 ms 9804 KB Output is correct
118 Correct 21 ms 12264 KB Output is correct
119 Correct 24 ms 12748 KB Output is correct
120 Correct 26 ms 13140 KB Output is correct
121 Correct 6 ms 9684 KB Output is correct
122 Correct 7 ms 9684 KB Output is correct
123 Correct 7 ms 9684 KB Output is correct
124 Correct 8 ms 9684 KB Output is correct
125 Correct 7 ms 9684 KB Output is correct
126 Correct 7 ms 9868 KB Output is correct
127 Correct 7 ms 9936 KB Output is correct
128 Correct 7 ms 9884 KB Output is correct
129 Correct 6 ms 9940 KB Output is correct
130 Correct 7 ms 9940 KB Output is correct
131 Correct 7 ms 9940 KB Output is correct
132 Correct 33 ms 13416 KB Output is correct
133 Correct 30 ms 13388 KB Output is correct
134 Correct 40 ms 13452 KB Output is correct
135 Correct 8 ms 9904 KB Output is correct
136 Correct 167 ms 9920 KB Output is correct
137 Correct 96 ms 9864 KB Output is correct
138 Correct 72 ms 9880 KB Output is correct
139 Correct 86 ms 9928 KB Output is correct
140 Correct 55 ms 9932 KB Output is correct
141 Correct 17 ms 10964 KB Output is correct
142 Correct 17 ms 10828 KB Output is correct
143 Correct 20 ms 11092 KB Output is correct
144 Correct 16 ms 10964 KB Output is correct
145 Correct 18 ms 11024 KB Output is correct
146 Correct 16 ms 10728 KB Output is correct
147 Correct 24 ms 12168 KB Output is correct
148 Correct 12 ms 10260 KB Output is correct
149 Correct 27 ms 12400 KB Output is correct
150 Correct 10 ms 10196 KB Output is correct
151 Correct 29 ms 12888 KB Output is correct
152 Correct 12 ms 10452 KB Output is correct
153 Correct 11 ms 10452 KB Output is correct
154 Correct 14 ms 10720 KB Output is correct
155 Correct 12 ms 10452 KB Output is correct
156 Correct 11 ms 10452 KB Output is correct
157 Correct 8 ms 9964 KB Output is correct
158 Correct 227 ms 9960 KB Output is correct
159 Correct 161 ms 10060 KB Output is correct
160 Correct 133 ms 10104 KB Output is correct
161 Correct 120 ms 9988 KB Output is correct
162 Correct 106 ms 10004 KB Output is correct
163 Correct 22 ms 11408 KB Output is correct
164 Correct 22 ms 11396 KB Output is correct
165 Correct 22 ms 11340 KB Output is correct
166 Correct 22 ms 11276 KB Output is correct
167 Correct 22 ms 11308 KB Output is correct
168 Correct 22 ms 11288 KB Output is correct
169 Correct 38 ms 13908 KB Output is correct
170 Correct 12 ms 10612 KB Output is correct
171 Correct 34 ms 13740 KB Output is correct
172 Correct 12 ms 10688 KB Output is correct
173 Correct 34 ms 13752 KB Output is correct
174 Correct 12 ms 10680 KB Output is correct
175 Correct 15 ms 10984 KB Output is correct
176 Correct 15 ms 10836 KB Output is correct
177 Correct 14 ms 10856 KB Output is correct
178 Correct 14 ms 10808 KB Output is correct
179 Correct 14 ms 10496 KB Output is correct
180 Correct 449 ms 10444 KB Output is correct
181 Correct 508 ms 10796 KB Output is correct
182 Correct 635 ms 11192 KB Output is correct
183 Correct 316 ms 10752 KB Output is correct
184 Correct 262 ms 10712 KB Output is correct
185 Correct 34 ms 14156 KB Output is correct
186 Correct 33 ms 15828 KB Output is correct
187 Correct 40 ms 14984 KB Output is correct
188 Correct 42 ms 14612 KB Output is correct
189 Correct 40 ms 14504 KB Output is correct
190 Correct 46 ms 15824 KB Output is correct
191 Correct 40 ms 15408 KB Output is correct
192 Correct 33 ms 13740 KB Output is correct
193 Correct 31 ms 13148 KB Output is correct
194 Correct 20 ms 11084 KB Output is correct
195 Correct 1134 ms 11448 KB Output is correct
196 Correct 805 ms 11180 KB Output is correct
197 Correct 640 ms 11208 KB Output is correct
198 Correct 569 ms 11244 KB Output is correct
199 Correct 518 ms 11252 KB Output is correct
200 Correct 67 ms 22260 KB Output is correct
201 Correct 68 ms 22264 KB Output is correct
202 Correct 66 ms 22236 KB Output is correct
203 Correct 67 ms 22244 KB Output is correct
204 Correct 64 ms 22328 KB Output is correct
205 Correct 68 ms 22376 KB Output is correct
206 Correct 63 ms 21220 KB Output is correct
207 Correct 54 ms 20556 KB Output is correct
208 Correct 60 ms 21224 KB Output is correct
209 Correct 54 ms 20680 KB Output is correct
210 Correct 64 ms 21216 KB Output is correct
211 Correct 53 ms 20684 KB Output is correct
212 Correct 59 ms 21892 KB Output is correct
213 Correct 56 ms 18628 KB Output is correct
214 Correct 53 ms 18116 KB Output is correct
215 Correct 55 ms 17884 KB Output is correct