Submission #553299

# Submission time Handle Problem Language Result Execution time Memory
553299 2022-04-25T11:22:15 Z FatihSolak Painting Walls (APIO20_paint) C++17
100 / 100
652 ms 290388 KB
#include "paint.h"
#include <bits/stdc++.h>
#define N 100005
#define K 705
using namespace std;
vector<int> col[N];
int dp[N][K];
int ok[N];
int minimumInstructions(int n, int m, int k, vector<int> c,vector<int> a, vector<vector<int>> b) {
	for(int i = 0;i<m;i++){
		for(int j = 0;j<a[i];j++){
			col[b[i][j]].push_back(i);
		}
	}
	for(int i = 0;i<n;i++){
		if(col[c[i]].size() == 0)
			return -1;
	}
	/*
	for(int i = 0;i<k;i++){
		for(auto u:col[i]){
			cout << u << " ";
		}
		cout << endl;
	}*/
	for(int i = 0;i<col[c[0]].size();i++){
		dp[0][i] = 1; 
		if(dp[0][i] == m)
			ok[0 - m + 1] = 1;
	}
	for(int i = 1;i<n;i++){ 
		int pt = 0;
		for(int j = 0;j<col[c[i]].size();j++){
			dp[i][j] = 1;
			while(pt + 1 < col[c[i-1]].size() &&  col[c[i-1]][pt] + 1 < col[c[i]][j]){
				pt++;
			}
			//cout << "hey" << pt << endl;
			if(col[c[i-1]][pt] + 1 == col[c[i]][j]){
				dp[i][j] = max(dp[i][j],min(m, dp[i-1][pt]+1));
			}
			if(col[c[i]][j] == 0 && col[c[i-1]].back() == m-1){
				dp[i][j] = max(dp[i][j],min(m, dp[i-1][col[c[i-1]].size()-1]+1));
			}
			//cout << dp[i][j] << " ";
			if(dp[i][j] == m)
				ok[i - m  +1] = 1;
		}
		//cout << endl;
	}
	/*
	for(int i = 0;i<n;i++){
		cout << ok[i] << " ";
	}
	cout << endl;*/
	int cnt = 0;
	int last = -1;
	int maxi = 0;
	while(maxi < n){
		int val = maxi;
		for(int i = last+1;i<=maxi;i++){
			if(ok[i]){
				val = max(val,i + m);
			}
		}
		if(val == maxi){
			return -1;
		}
		cnt++;
		last = maxi;
		maxi = val;
	}
	return cnt;
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:26:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |  for(int i = 0;i<col[c[0]].size();i++){
      |                ~^~~~~~~~~~~~~~~~~
paint.cpp:33:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |   for(int j = 0;j<col[c[i]].size();j++){
      |                 ~^~~~~~~~~~~~~~~~~
paint.cpp:35:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   35 |    while(pt + 1 < col[c[i-1]].size() &&  col[c[i-1]][pt] + 1 < col[c[i]][j]){
      |          ~~~~~~~^~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2656 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 3924 KB Output is correct
8 Correct 3 ms 3924 KB Output is correct
9 Correct 2 ms 3936 KB Output is correct
10 Correct 2 ms 3924 KB Output is correct
11 Correct 2 ms 3932 KB Output is correct
12 Correct 2 ms 3932 KB Output is correct
13 Correct 2 ms 4068 KB Output is correct
14 Correct 3 ms 3976 KB Output is correct
15 Correct 2 ms 4068 KB Output is correct
16 Correct 2 ms 4052 KB Output is correct
17 Correct 3 ms 4064 KB Output is correct
18 Correct 2 ms 4052 KB Output is correct
19 Correct 2 ms 2668 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2664 KB Output is correct
22 Correct 22 ms 8472 KB Output is correct
23 Correct 22 ms 8524 KB Output is correct
24 Correct 19 ms 8496 KB Output is correct
25 Correct 22 ms 58060 KB Output is correct
26 Correct 26 ms 58072 KB Output is correct
27 Correct 25 ms 58108 KB Output is correct
28 Correct 22 ms 58044 KB Output is correct
29 Correct 23 ms 58028 KB Output is correct
30 Correct 35 ms 58060 KB Output is correct
31 Correct 30 ms 59148 KB Output is correct
32 Correct 28 ms 59196 KB Output is correct
33 Correct 26 ms 59084 KB Output is correct
34 Correct 28 ms 59288 KB Output is correct
35 Correct 28 ms 59168 KB Output is correct
36 Correct 30 ms 59084 KB Output is correct
37 Correct 45 ms 62712 KB Output is correct
38 Correct 53 ms 62640 KB Output is correct
39 Correct 45 ms 62748 KB Output is correct
40 Correct 101 ms 254224 KB Output is correct
41 Correct 60 ms 160076 KB Output is correct
42 Correct 109 ms 275540 KB Output is correct
43 Correct 72 ms 183912 KB Output is correct
44 Correct 69 ms 167340 KB Output is correct
45 Correct 126 ms 279244 KB Output is correct
46 Correct 115 ms 251044 KB Output is correct
47 Correct 74 ms 161596 KB Output is correct
48 Correct 85 ms 164428 KB Output is correct
49 Correct 109 ms 178368 KB Output is correct
50 Correct 99 ms 203844 KB Output is correct
51 Correct 96 ms 212044 KB Output is correct
52 Correct 105 ms 279880 KB Output is correct
53 Correct 117 ms 279992 KB Output is correct
54 Correct 109 ms 279888 KB Output is correct
55 Correct 107 ms 279904 KB Output is correct
56 Correct 112 ms 279904 KB Output is correct
57 Correct 112 ms 279760 KB Output is correct
58 Correct 137 ms 289748 KB Output is correct
59 Correct 156 ms 289752 KB Output is correct
60 Correct 141 ms 289776 KB Output is correct
61 Correct 143 ms 289820 KB Output is correct
62 Correct 142 ms 289744 KB Output is correct
63 Correct 152 ms 289712 KB Output is correct
64 Correct 161 ms 288708 KB Output is correct
65 Correct 143 ms 288740 KB Output is correct
66 Correct 153 ms 288740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2656 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 3924 KB Output is correct
8 Correct 3 ms 3924 KB Output is correct
9 Correct 2 ms 3936 KB Output is correct
10 Correct 2 ms 3924 KB Output is correct
11 Correct 2 ms 3932 KB Output is correct
12 Correct 2 ms 3932 KB Output is correct
13 Correct 2 ms 4068 KB Output is correct
14 Correct 3 ms 3976 KB Output is correct
15 Correct 2 ms 4068 KB Output is correct
16 Correct 2 ms 4052 KB Output is correct
17 Correct 3 ms 4064 KB Output is correct
18 Correct 2 ms 4052 KB Output is correct
19 Correct 2 ms 2668 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2664 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 2 ms 2644 KB Output is correct
25 Correct 2 ms 2656 KB Output is correct
26 Correct 2 ms 2644 KB Output is correct
27 Correct 2 ms 3412 KB Output is correct
28 Correct 2 ms 3540 KB Output is correct
29 Correct 2 ms 3296 KB Output is correct
30 Correct 2 ms 3548 KB Output is correct
31 Correct 2 ms 3796 KB Output is correct
32 Correct 2 ms 3684 KB Output is correct
33 Correct 3 ms 3796 KB Output is correct
34 Correct 2 ms 3796 KB Output is correct
35 Correct 2 ms 3412 KB Output is correct
36 Correct 2 ms 3680 KB Output is correct
37 Correct 2 ms 3552 KB Output is correct
38 Correct 2 ms 2644 KB Output is correct
39 Correct 2 ms 3412 KB Output is correct
40 Correct 2 ms 2644 KB Output is correct
41 Correct 3 ms 3540 KB Output is correct
42 Correct 2 ms 2644 KB Output is correct
43 Correct 2 ms 3540 KB Output is correct
44 Correct 2 ms 3924 KB Output is correct
45 Correct 3 ms 3940 KB Output is correct
46 Correct 2 ms 3924 KB Output is correct
47 Correct 3 ms 4052 KB Output is correct
48 Correct 2 ms 4052 KB Output is correct
49 Correct 2 ms 4052 KB Output is correct
50 Correct 2 ms 4052 KB Output is correct
51 Correct 2 ms 4052 KB Output is correct
52 Correct 3 ms 4052 KB Output is correct
53 Correct 2 ms 4052 KB Output is correct
54 Correct 2 ms 4052 KB Output is correct
55 Correct 2 ms 4052 KB Output is correct
56 Correct 2 ms 2660 KB Output is correct
57 Correct 2 ms 4052 KB Output is correct
58 Correct 2 ms 2644 KB Output is correct
59 Correct 3 ms 4052 KB Output is correct
60 Correct 2 ms 2668 KB Output is correct
61 Correct 3 ms 4052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2652 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2656 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 2 ms 3924 KB Output is correct
10 Correct 3 ms 3924 KB Output is correct
11 Correct 2 ms 3936 KB Output is correct
12 Correct 2 ms 3924 KB Output is correct
13 Correct 2 ms 3932 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4068 KB Output is correct
16 Correct 3 ms 3976 KB Output is correct
17 Correct 2 ms 4068 KB Output is correct
18 Correct 2 ms 4052 KB Output is correct
19 Correct 3 ms 4064 KB Output is correct
20 Correct 2 ms 4052 KB Output is correct
21 Correct 2 ms 2668 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2664 KB Output is correct
24 Correct 22 ms 8472 KB Output is correct
25 Correct 22 ms 8524 KB Output is correct
26 Correct 19 ms 8496 KB Output is correct
27 Correct 2 ms 2644 KB Output is correct
28 Correct 2 ms 2656 KB Output is correct
29 Correct 2 ms 2644 KB Output is correct
30 Correct 2 ms 3412 KB Output is correct
31 Correct 2 ms 3540 KB Output is correct
32 Correct 2 ms 3296 KB Output is correct
33 Correct 2 ms 3548 KB Output is correct
34 Correct 2 ms 3796 KB Output is correct
35 Correct 2 ms 3684 KB Output is correct
36 Correct 3 ms 3796 KB Output is correct
37 Correct 2 ms 3796 KB Output is correct
38 Correct 2 ms 3412 KB Output is correct
39 Correct 2 ms 3680 KB Output is correct
40 Correct 2 ms 3552 KB Output is correct
41 Correct 2 ms 2644 KB Output is correct
42 Correct 2 ms 3412 KB Output is correct
43 Correct 2 ms 2644 KB Output is correct
44 Correct 3 ms 3540 KB Output is correct
45 Correct 2 ms 2644 KB Output is correct
46 Correct 2 ms 3540 KB Output is correct
47 Correct 2 ms 3924 KB Output is correct
48 Correct 3 ms 3940 KB Output is correct
49 Correct 2 ms 3924 KB Output is correct
50 Correct 3 ms 4052 KB Output is correct
51 Correct 2 ms 4052 KB Output is correct
52 Correct 2 ms 4052 KB Output is correct
53 Correct 2 ms 4052 KB Output is correct
54 Correct 2 ms 4052 KB Output is correct
55 Correct 3 ms 4052 KB Output is correct
56 Correct 2 ms 4052 KB Output is correct
57 Correct 2 ms 4052 KB Output is correct
58 Correct 2 ms 4052 KB Output is correct
59 Correct 2 ms 2660 KB Output is correct
60 Correct 2 ms 4052 KB Output is correct
61 Correct 2 ms 2644 KB Output is correct
62 Correct 3 ms 4052 KB Output is correct
63 Correct 2 ms 2668 KB Output is correct
64 Correct 3 ms 4052 KB Output is correct
65 Correct 2 ms 3284 KB Output is correct
66 Correct 3 ms 3924 KB Output is correct
67 Correct 3 ms 3924 KB Output is correct
68 Correct 3 ms 3924 KB Output is correct
69 Correct 3 ms 3808 KB Output is correct
70 Correct 4 ms 4072 KB Output is correct
71 Correct 4 ms 4052 KB Output is correct
72 Correct 4 ms 3924 KB Output is correct
73 Correct 3 ms 3820 KB Output is correct
74 Correct 4 ms 3832 KB Output is correct
75 Correct 3 ms 3796 KB Output is correct
76 Correct 18 ms 5920 KB Output is correct
77 Correct 17 ms 6424 KB Output is correct
78 Correct 24 ms 6976 KB Output is correct
79 Correct 3 ms 4052 KB Output is correct
80 Correct 3 ms 4064 KB Output is correct
81 Correct 3 ms 4064 KB Output is correct
82 Correct 4 ms 4052 KB Output is correct
83 Correct 3 ms 4052 KB Output is correct
84 Correct 4 ms 4308 KB Output is correct
85 Correct 4 ms 4296 KB Output is correct
86 Correct 5 ms 4288 KB Output is correct
87 Correct 5 ms 4332 KB Output is correct
88 Correct 5 ms 4308 KB Output is correct
89 Correct 4 ms 4308 KB Output is correct
90 Correct 38 ms 7256 KB Output is correct
91 Correct 29 ms 7260 KB Output is correct
92 Correct 26 ms 7232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2652 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2656 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 2 ms 3924 KB Output is correct
10 Correct 3 ms 3924 KB Output is correct
11 Correct 2 ms 3936 KB Output is correct
12 Correct 2 ms 3924 KB Output is correct
13 Correct 2 ms 3932 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4068 KB Output is correct
16 Correct 3 ms 3976 KB Output is correct
17 Correct 2 ms 4068 KB Output is correct
18 Correct 2 ms 4052 KB Output is correct
19 Correct 3 ms 4064 KB Output is correct
20 Correct 2 ms 4052 KB Output is correct
21 Correct 2 ms 2668 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2664 KB Output is correct
24 Correct 22 ms 8472 KB Output is correct
25 Correct 22 ms 8524 KB Output is correct
26 Correct 19 ms 8496 KB Output is correct
27 Correct 22 ms 58060 KB Output is correct
28 Correct 26 ms 58072 KB Output is correct
29 Correct 25 ms 58108 KB Output is correct
30 Correct 22 ms 58044 KB Output is correct
31 Correct 23 ms 58028 KB Output is correct
32 Correct 35 ms 58060 KB Output is correct
33 Correct 30 ms 59148 KB Output is correct
34 Correct 28 ms 59196 KB Output is correct
35 Correct 26 ms 59084 KB Output is correct
36 Correct 28 ms 59288 KB Output is correct
37 Correct 28 ms 59168 KB Output is correct
38 Correct 30 ms 59084 KB Output is correct
39 Correct 45 ms 62712 KB Output is correct
40 Correct 53 ms 62640 KB Output is correct
41 Correct 45 ms 62748 KB Output is correct
42 Correct 2 ms 2644 KB Output is correct
43 Correct 2 ms 2656 KB Output is correct
44 Correct 2 ms 2644 KB Output is correct
45 Correct 2 ms 3412 KB Output is correct
46 Correct 2 ms 3540 KB Output is correct
47 Correct 2 ms 3296 KB Output is correct
48 Correct 2 ms 3548 KB Output is correct
49 Correct 2 ms 3796 KB Output is correct
50 Correct 2 ms 3684 KB Output is correct
51 Correct 3 ms 3796 KB Output is correct
52 Correct 2 ms 3796 KB Output is correct
53 Correct 2 ms 3412 KB Output is correct
54 Correct 2 ms 3680 KB Output is correct
55 Correct 2 ms 3552 KB Output is correct
56 Correct 2 ms 2644 KB Output is correct
57 Correct 2 ms 3412 KB Output is correct
58 Correct 2 ms 2644 KB Output is correct
59 Correct 3 ms 3540 KB Output is correct
60 Correct 2 ms 2644 KB Output is correct
61 Correct 2 ms 3540 KB Output is correct
62 Correct 2 ms 3924 KB Output is correct
63 Correct 3 ms 3940 KB Output is correct
64 Correct 2 ms 3924 KB Output is correct
65 Correct 3 ms 4052 KB Output is correct
66 Correct 2 ms 4052 KB Output is correct
67 Correct 2 ms 4052 KB Output is correct
68 Correct 2 ms 4052 KB Output is correct
69 Correct 2 ms 4052 KB Output is correct
70 Correct 3 ms 4052 KB Output is correct
71 Correct 2 ms 4052 KB Output is correct
72 Correct 2 ms 4052 KB Output is correct
73 Correct 2 ms 4052 KB Output is correct
74 Correct 2 ms 2660 KB Output is correct
75 Correct 2 ms 4052 KB Output is correct
76 Correct 2 ms 2644 KB Output is correct
77 Correct 3 ms 4052 KB Output is correct
78 Correct 2 ms 2668 KB Output is correct
79 Correct 3 ms 4052 KB Output is correct
80 Correct 2 ms 3284 KB Output is correct
81 Correct 3 ms 3924 KB Output is correct
82 Correct 3 ms 3924 KB Output is correct
83 Correct 3 ms 3924 KB Output is correct
84 Correct 3 ms 3808 KB Output is correct
85 Correct 4 ms 4072 KB Output is correct
86 Correct 4 ms 4052 KB Output is correct
87 Correct 4 ms 3924 KB Output is correct
88 Correct 3 ms 3820 KB Output is correct
89 Correct 4 ms 3832 KB Output is correct
90 Correct 3 ms 3796 KB Output is correct
91 Correct 18 ms 5920 KB Output is correct
92 Correct 17 ms 6424 KB Output is correct
93 Correct 24 ms 6976 KB Output is correct
94 Correct 3 ms 4052 KB Output is correct
95 Correct 3 ms 4064 KB Output is correct
96 Correct 3 ms 4064 KB Output is correct
97 Correct 4 ms 4052 KB Output is correct
98 Correct 3 ms 4052 KB Output is correct
99 Correct 4 ms 4308 KB Output is correct
100 Correct 4 ms 4296 KB Output is correct
101 Correct 5 ms 4288 KB Output is correct
102 Correct 5 ms 4332 KB Output is correct
103 Correct 5 ms 4308 KB Output is correct
104 Correct 4 ms 4308 KB Output is correct
105 Correct 38 ms 7256 KB Output is correct
106 Correct 29 ms 7260 KB Output is correct
107 Correct 26 ms 7232 KB Output is correct
108 Correct 23 ms 57764 KB Output is correct
109 Correct 71 ms 42948 KB Output is correct
110 Correct 77 ms 36664 KB Output is correct
111 Correct 74 ms 34592 KB Output is correct
112 Correct 76 ms 45264 KB Output is correct
113 Correct 51 ms 32540 KB Output is correct
114 Correct 24 ms 34828 KB Output is correct
115 Correct 24 ms 31872 KB Output is correct
116 Correct 34 ms 54636 KB Output is correct
117 Correct 24 ms 34240 KB Output is correct
118 Correct 27 ms 39164 KB Output is correct
119 Correct 28 ms 43468 KB Output is correct
120 Correct 21 ms 5580 KB Output is correct
121 Correct 20 ms 35956 KB Output is correct
122 Correct 24 ms 5984 KB Output is correct
123 Correct 17 ms 34824 KB Output is correct
124 Correct 22 ms 6524 KB Output is correct
125 Correct 26 ms 55116 KB Output is correct
126 Correct 23 ms 46436 KB Output is correct
127 Correct 26 ms 55012 KB Output is correct
128 Correct 19 ms 40788 KB Output is correct
129 Correct 20 ms 42212 KB Output is correct
130 Correct 25 ms 58068 KB Output is correct
131 Correct 112 ms 58132 KB Output is correct
132 Correct 129 ms 58024 KB Output is correct
133 Correct 118 ms 58176 KB Output is correct
134 Correct 108 ms 58100 KB Output is correct
135 Correct 97 ms 58144 KB Output is correct
136 Correct 42 ms 59980 KB Output is correct
137 Correct 41 ms 59968 KB Output is correct
138 Correct 38 ms 60020 KB Output is correct
139 Correct 38 ms 60096 KB Output is correct
140 Correct 39 ms 60052 KB Output is correct
141 Correct 38 ms 59972 KB Output is correct
142 Correct 29 ms 7696 KB Output is correct
143 Correct 34 ms 58936 KB Output is correct
144 Correct 44 ms 7604 KB Output is correct
145 Correct 35 ms 58964 KB Output is correct
146 Correct 29 ms 7700 KB Output is correct
147 Correct 27 ms 58868 KB Output is correct
148 Correct 31 ms 59356 KB Output is correct
149 Correct 28 ms 59228 KB Output is correct
150 Correct 36 ms 59200 KB Output is correct
151 Correct 31 ms 59108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2652 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2656 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 2 ms 3924 KB Output is correct
10 Correct 3 ms 3924 KB Output is correct
11 Correct 2 ms 3936 KB Output is correct
12 Correct 2 ms 3924 KB Output is correct
13 Correct 2 ms 3932 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4068 KB Output is correct
16 Correct 3 ms 3976 KB Output is correct
17 Correct 2 ms 4068 KB Output is correct
18 Correct 2 ms 4052 KB Output is correct
19 Correct 3 ms 4064 KB Output is correct
20 Correct 2 ms 4052 KB Output is correct
21 Correct 2 ms 2668 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2664 KB Output is correct
24 Correct 22 ms 8472 KB Output is correct
25 Correct 22 ms 8524 KB Output is correct
26 Correct 19 ms 8496 KB Output is correct
27 Correct 22 ms 58060 KB Output is correct
28 Correct 26 ms 58072 KB Output is correct
29 Correct 25 ms 58108 KB Output is correct
30 Correct 22 ms 58044 KB Output is correct
31 Correct 23 ms 58028 KB Output is correct
32 Correct 35 ms 58060 KB Output is correct
33 Correct 30 ms 59148 KB Output is correct
34 Correct 28 ms 59196 KB Output is correct
35 Correct 26 ms 59084 KB Output is correct
36 Correct 28 ms 59288 KB Output is correct
37 Correct 28 ms 59168 KB Output is correct
38 Correct 30 ms 59084 KB Output is correct
39 Correct 45 ms 62712 KB Output is correct
40 Correct 53 ms 62640 KB Output is correct
41 Correct 45 ms 62748 KB Output is correct
42 Correct 101 ms 254224 KB Output is correct
43 Correct 60 ms 160076 KB Output is correct
44 Correct 109 ms 275540 KB Output is correct
45 Correct 72 ms 183912 KB Output is correct
46 Correct 69 ms 167340 KB Output is correct
47 Correct 126 ms 279244 KB Output is correct
48 Correct 115 ms 251044 KB Output is correct
49 Correct 74 ms 161596 KB Output is correct
50 Correct 85 ms 164428 KB Output is correct
51 Correct 109 ms 178368 KB Output is correct
52 Correct 99 ms 203844 KB Output is correct
53 Correct 96 ms 212044 KB Output is correct
54 Correct 105 ms 279880 KB Output is correct
55 Correct 117 ms 279992 KB Output is correct
56 Correct 109 ms 279888 KB Output is correct
57 Correct 107 ms 279904 KB Output is correct
58 Correct 112 ms 279904 KB Output is correct
59 Correct 112 ms 279760 KB Output is correct
60 Correct 137 ms 289748 KB Output is correct
61 Correct 156 ms 289752 KB Output is correct
62 Correct 141 ms 289776 KB Output is correct
63 Correct 143 ms 289820 KB Output is correct
64 Correct 142 ms 289744 KB Output is correct
65 Correct 152 ms 289712 KB Output is correct
66 Correct 161 ms 288708 KB Output is correct
67 Correct 143 ms 288740 KB Output is correct
68 Correct 153 ms 288740 KB Output is correct
69 Correct 2 ms 2644 KB Output is correct
70 Correct 2 ms 2656 KB Output is correct
71 Correct 2 ms 2644 KB Output is correct
72 Correct 2 ms 3412 KB Output is correct
73 Correct 2 ms 3540 KB Output is correct
74 Correct 2 ms 3296 KB Output is correct
75 Correct 2 ms 3548 KB Output is correct
76 Correct 2 ms 3796 KB Output is correct
77 Correct 2 ms 3684 KB Output is correct
78 Correct 3 ms 3796 KB Output is correct
79 Correct 2 ms 3796 KB Output is correct
80 Correct 2 ms 3412 KB Output is correct
81 Correct 2 ms 3680 KB Output is correct
82 Correct 2 ms 3552 KB Output is correct
83 Correct 2 ms 2644 KB Output is correct
84 Correct 2 ms 3412 KB Output is correct
85 Correct 2 ms 2644 KB Output is correct
86 Correct 3 ms 3540 KB Output is correct
87 Correct 2 ms 2644 KB Output is correct
88 Correct 2 ms 3540 KB Output is correct
89 Correct 2 ms 3924 KB Output is correct
90 Correct 3 ms 3940 KB Output is correct
91 Correct 2 ms 3924 KB Output is correct
92 Correct 3 ms 4052 KB Output is correct
93 Correct 2 ms 4052 KB Output is correct
94 Correct 2 ms 4052 KB Output is correct
95 Correct 2 ms 4052 KB Output is correct
96 Correct 2 ms 4052 KB Output is correct
97 Correct 3 ms 4052 KB Output is correct
98 Correct 2 ms 4052 KB Output is correct
99 Correct 2 ms 4052 KB Output is correct
100 Correct 2 ms 4052 KB Output is correct
101 Correct 2 ms 2660 KB Output is correct
102 Correct 2 ms 4052 KB Output is correct
103 Correct 2 ms 2644 KB Output is correct
104 Correct 3 ms 4052 KB Output is correct
105 Correct 2 ms 2668 KB Output is correct
106 Correct 3 ms 4052 KB Output is correct
107 Correct 2 ms 3284 KB Output is correct
108 Correct 3 ms 3924 KB Output is correct
109 Correct 3 ms 3924 KB Output is correct
110 Correct 3 ms 3924 KB Output is correct
111 Correct 3 ms 3808 KB Output is correct
112 Correct 4 ms 4072 KB Output is correct
113 Correct 4 ms 4052 KB Output is correct
114 Correct 4 ms 3924 KB Output is correct
115 Correct 3 ms 3820 KB Output is correct
116 Correct 4 ms 3832 KB Output is correct
117 Correct 3 ms 3796 KB Output is correct
118 Correct 18 ms 5920 KB Output is correct
119 Correct 17 ms 6424 KB Output is correct
120 Correct 24 ms 6976 KB Output is correct
121 Correct 3 ms 4052 KB Output is correct
122 Correct 3 ms 4064 KB Output is correct
123 Correct 3 ms 4064 KB Output is correct
124 Correct 4 ms 4052 KB Output is correct
125 Correct 3 ms 4052 KB Output is correct
126 Correct 4 ms 4308 KB Output is correct
127 Correct 4 ms 4296 KB Output is correct
128 Correct 5 ms 4288 KB Output is correct
129 Correct 5 ms 4332 KB Output is correct
130 Correct 5 ms 4308 KB Output is correct
131 Correct 4 ms 4308 KB Output is correct
132 Correct 38 ms 7256 KB Output is correct
133 Correct 29 ms 7260 KB Output is correct
134 Correct 26 ms 7232 KB Output is correct
135 Correct 23 ms 57764 KB Output is correct
136 Correct 71 ms 42948 KB Output is correct
137 Correct 77 ms 36664 KB Output is correct
138 Correct 74 ms 34592 KB Output is correct
139 Correct 76 ms 45264 KB Output is correct
140 Correct 51 ms 32540 KB Output is correct
141 Correct 24 ms 34828 KB Output is correct
142 Correct 24 ms 31872 KB Output is correct
143 Correct 34 ms 54636 KB Output is correct
144 Correct 24 ms 34240 KB Output is correct
145 Correct 27 ms 39164 KB Output is correct
146 Correct 28 ms 43468 KB Output is correct
147 Correct 21 ms 5580 KB Output is correct
148 Correct 20 ms 35956 KB Output is correct
149 Correct 24 ms 5984 KB Output is correct
150 Correct 17 ms 34824 KB Output is correct
151 Correct 22 ms 6524 KB Output is correct
152 Correct 26 ms 55116 KB Output is correct
153 Correct 23 ms 46436 KB Output is correct
154 Correct 26 ms 55012 KB Output is correct
155 Correct 19 ms 40788 KB Output is correct
156 Correct 20 ms 42212 KB Output is correct
157 Correct 25 ms 58068 KB Output is correct
158 Correct 112 ms 58132 KB Output is correct
159 Correct 129 ms 58024 KB Output is correct
160 Correct 118 ms 58176 KB Output is correct
161 Correct 108 ms 58100 KB Output is correct
162 Correct 97 ms 58144 KB Output is correct
163 Correct 42 ms 59980 KB Output is correct
164 Correct 41 ms 59968 KB Output is correct
165 Correct 38 ms 60020 KB Output is correct
166 Correct 38 ms 60096 KB Output is correct
167 Correct 39 ms 60052 KB Output is correct
168 Correct 38 ms 59972 KB Output is correct
169 Correct 29 ms 7696 KB Output is correct
170 Correct 34 ms 58936 KB Output is correct
171 Correct 44 ms 7604 KB Output is correct
172 Correct 35 ms 58964 KB Output is correct
173 Correct 29 ms 7700 KB Output is correct
174 Correct 27 ms 58868 KB Output is correct
175 Correct 31 ms 59356 KB Output is correct
176 Correct 28 ms 59228 KB Output is correct
177 Correct 36 ms 59200 KB Output is correct
178 Correct 31 ms 59108 KB Output is correct
179 Correct 71 ms 174464 KB Output is correct
180 Correct 206 ms 146944 KB Output is correct
181 Correct 453 ms 211016 KB Output is correct
182 Correct 594 ms 277176 KB Output is correct
183 Correct 315 ms 182984 KB Output is correct
184 Correct 261 ms 175464 KB Output is correct
185 Correct 82 ms 149536 KB Output is correct
186 Correct 86 ms 183952 KB Output is correct
187 Correct 95 ms 176604 KB Output is correct
188 Correct 30 ms 7116 KB Output is correct
189 Correct 122 ms 249776 KB Output is correct
190 Correct 29 ms 8200 KB Output is correct
191 Correct 120 ms 222264 KB Output is correct
192 Correct 22 ms 6420 KB Output is correct
193 Correct 95 ms 188500 KB Output is correct
194 Correct 123 ms 279836 KB Output is correct
195 Correct 467 ms 279980 KB Output is correct
196 Correct 652 ms 279620 KB Output is correct
197 Correct 612 ms 279648 KB Output is correct
198 Correct 532 ms 279688 KB Output is correct
199 Correct 492 ms 279724 KB Output is correct
200 Correct 161 ms 290324 KB Output is correct
201 Correct 151 ms 290340 KB Output is correct
202 Correct 159 ms 290388 KB Output is correct
203 Correct 164 ms 290336 KB Output is correct
204 Correct 156 ms 290264 KB Output is correct
205 Correct 164 ms 290252 KB Output is correct
206 Correct 68 ms 13148 KB Output is correct
207 Correct 159 ms 288648 KB Output is correct
208 Correct 47 ms 13148 KB Output is correct
209 Correct 135 ms 288596 KB Output is correct
210 Correct 60 ms 13104 KB Output is correct
211 Correct 150 ms 288592 KB Output is correct
212 Correct 144 ms 289868 KB Output is correct
213 Correct 139 ms 286864 KB Output is correct
214 Correct 158 ms 286448 KB Output is correct
215 Correct 137 ms 286244 KB Output is correct