답안 #1106245

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1106245 2024-10-29T16:20:24 Z vladilius 벽 칠하기 (APIO20_paint) C++17
63 / 100
874 ms 524288 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define pb push_back
#define ff first
#define ss second
const int inf = 3e5;

int minimumInstructions(int n, int m, int k, vector<int> x, vector<int> A, vector<vector<int>> B){
    vector<int> d[k];
    for (int i = 0; i < m; i++){
        for (int j: B[i]){
            d[j].pb(i);
        }
    }
    
    vector<int> V[inf];
    for (int i = 0; i < n; i++){
        for (int j: d[x[i]]){
            V[j + n - i].pb(i);
            V[(j + m) + n - i].pb(i);
        }
    }
    
    vector<bool> gd(n);
    for (int y = 0; y < inf; y++){
        int i = 0;
        while (i < V[y].size()){
            int j = i;
            while (j + 1 < V[y].size() && (V[y][j] + 1) == V[y][j + 1]) j++;
            for (int t = V[y][i]; t <= V[y][j] - m + 1; t++) gd[t] = 1;
            
            i = j + 1;
        }
    }
    
    int mx = -1, t = -1, out = 0;
    for (int i = 0; i < n; i++){
        if (gd[i]) t = max(t, i);
        if (i == (mx + 1)){
            if (t == -1) return -1;
            mx = t + m - 1;
            t = -1;
            out++;
        }
    }
    return out;
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:29:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |         while (i < V[y].size()){
      |                ~~^~~~~~~~~~~~~
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 |             while (j + 1 < V[y].size() && (V[y][j] + 1) == V[y][j + 1]) j++;
      |                    ~~~~~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 7248 KB Output is correct
2 Correct 7 ms 7476 KB Output is correct
3 Correct 6 ms 7248 KB Output is correct
4 Correct 6 ms 7248 KB Output is correct
5 Correct 6 ms 7248 KB Output is correct
6 Correct 8 ms 7248 KB Output is correct
7 Correct 6 ms 7464 KB Output is correct
8 Correct 7 ms 7504 KB Output is correct
9 Correct 7 ms 7248 KB Output is correct
10 Correct 6 ms 7248 KB Output is correct
11 Correct 6 ms 7248 KB Output is correct
12 Correct 7 ms 7300 KB Output is correct
13 Correct 8 ms 9808 KB Output is correct
14 Correct 8 ms 9808 KB Output is correct
15 Correct 13 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 8 ms 9808 KB Output is correct
18 Correct 8 ms 9808 KB Output is correct
19 Correct 9 ms 9976 KB Output is correct
20 Correct 10 ms 9824 KB Output is correct
21 Correct 9 ms 9808 KB Output is correct
22 Correct 21 ms 13648 KB Output is correct
23 Correct 21 ms 13648 KB Output is correct
24 Correct 22 ms 13648 KB Output is correct
25 Correct 9 ms 8184 KB Output is correct
26 Correct 9 ms 8156 KB Output is correct
27 Correct 10 ms 8016 KB Output is correct
28 Correct 9 ms 8216 KB Output is correct
29 Correct 11 ms 8016 KB Output is correct
30 Correct 9 ms 8184 KB Output is correct
31 Correct 13 ms 11088 KB Output is correct
32 Correct 13 ms 10888 KB Output is correct
33 Correct 13 ms 11000 KB Output is correct
34 Correct 13 ms 11044 KB Output is correct
35 Correct 13 ms 11092 KB Output is correct
36 Correct 13 ms 11044 KB Output is correct
37 Correct 26 ms 14416 KB Output is correct
38 Correct 28 ms 14416 KB Output is correct
39 Correct 25 ms 14416 KB Output is correct
40 Correct 19 ms 11032 KB Output is correct
41 Correct 17 ms 9528 KB Output is correct
42 Correct 22 ms 11088 KB Output is correct
43 Correct 17 ms 9808 KB Output is correct
44 Correct 15 ms 9720 KB Output is correct
45 Correct 21 ms 11088 KB Output is correct
46 Correct 36 ms 19780 KB Output is correct
47 Correct 25 ms 15052 KB Output is correct
48 Correct 29 ms 17520 KB Output is correct
49 Correct 42 ms 19280 KB Output is correct
50 Correct 47 ms 19284 KB Output is correct
51 Correct 41 ms 16464 KB Output is correct
52 Correct 19 ms 11344 KB Output is correct
53 Correct 18 ms 11224 KB Output is correct
54 Correct 21 ms 11088 KB Output is correct
55 Correct 21 ms 11088 KB Output is correct
56 Correct 21 ms 11088 KB Output is correct
57 Correct 21 ms 11088 KB Output is correct
58 Correct 39 ms 20460 KB Output is correct
59 Correct 40 ms 20420 KB Output is correct
60 Correct 40 ms 20428 KB Output is correct
61 Correct 43 ms 20520 KB Output is correct
62 Correct 40 ms 20552 KB Output is correct
63 Correct 40 ms 20428 KB Output is correct
64 Correct 56 ms 22088 KB Output is correct
65 Correct 56 ms 22088 KB Output is correct
66 Correct 56 ms 22088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 7248 KB Output is correct
2 Correct 7 ms 7476 KB Output is correct
3 Correct 6 ms 7248 KB Output is correct
4 Correct 6 ms 7248 KB Output is correct
5 Correct 6 ms 7248 KB Output is correct
6 Correct 8 ms 7248 KB Output is correct
7 Correct 6 ms 7464 KB Output is correct
8 Correct 7 ms 7504 KB Output is correct
9 Correct 7 ms 7248 KB Output is correct
10 Correct 6 ms 7248 KB Output is correct
11 Correct 6 ms 7248 KB Output is correct
12 Correct 7 ms 7300 KB Output is correct
13 Correct 8 ms 9808 KB Output is correct
14 Correct 8 ms 9808 KB Output is correct
15 Correct 13 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 8 ms 9808 KB Output is correct
18 Correct 8 ms 9808 KB Output is correct
19 Correct 9 ms 9976 KB Output is correct
20 Correct 10 ms 9824 KB Output is correct
21 Correct 9 ms 9808 KB Output is correct
22 Correct 6 ms 7248 KB Output is correct
23 Correct 7 ms 7308 KB Output is correct
24 Correct 6 ms 7356 KB Output is correct
25 Correct 7 ms 7248 KB Output is correct
26 Correct 8 ms 7248 KB Output is correct
27 Correct 7 ms 7248 KB Output is correct
28 Correct 6 ms 7336 KB Output is correct
29 Correct 7 ms 7504 KB Output is correct
30 Correct 7 ms 7504 KB Output is correct
31 Correct 6 ms 7500 KB Output is correct
32 Correct 7 ms 7676 KB Output is correct
33 Correct 8 ms 9464 KB Output is correct
34 Correct 8 ms 8784 KB Output is correct
35 Correct 8 ms 8784 KB Output is correct
36 Correct 9 ms 9808 KB Output is correct
37 Correct 8 ms 9296 KB Output is correct
38 Correct 9 ms 9552 KB Output is correct
39 Correct 7 ms 7504 KB Output is correct
40 Correct 8 ms 9100 KB Output is correct
41 Correct 7 ms 7672 KB Output is correct
42 Correct 8 ms 9552 KB Output is correct
43 Correct 8 ms 9552 KB Output is correct
44 Correct 7 ms 7260 KB Output is correct
45 Correct 7 ms 7504 KB Output is correct
46 Correct 7 ms 7628 KB Output is correct
47 Correct 7 ms 7504 KB Output is correct
48 Correct 7 ms 7504 KB Output is correct
49 Correct 7 ms 7504 KB Output is correct
50 Correct 8 ms 9808 KB Output is correct
51 Correct 10 ms 9808 KB Output is correct
52 Correct 11 ms 9808 KB Output is correct
53 Correct 10 ms 9824 KB Output is correct
54 Correct 9 ms 9824 KB Output is correct
55 Correct 9 ms 9736 KB Output is correct
56 Correct 9 ms 9860 KB Output is correct
57 Correct 7 ms 7504 KB Output is correct
58 Correct 9 ms 9808 KB Output is correct
59 Correct 7 ms 7504 KB Output is correct
60 Correct 9 ms 9808 KB Output is correct
61 Correct 7 ms 7372 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 7 ms 7308 KB Output is correct
3 Correct 7 ms 7248 KB Output is correct
4 Correct 7 ms 7476 KB Output is correct
5 Correct 6 ms 7248 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 6 ms 7248 KB Output is correct
8 Correct 8 ms 7248 KB Output is correct
9 Correct 6 ms 7464 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7248 KB Output is correct
12 Correct 6 ms 7248 KB Output is correct
13 Correct 6 ms 7248 KB Output is correct
14 Correct 7 ms 7300 KB Output is correct
15 Correct 8 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 13 ms 9808 KB Output is correct
18 Correct 8 ms 9808 KB Output is correct
19 Correct 8 ms 9808 KB Output is correct
20 Correct 8 ms 9808 KB Output is correct
21 Correct 9 ms 9976 KB Output is correct
22 Correct 10 ms 9824 KB Output is correct
23 Correct 9 ms 9808 KB Output is correct
24 Correct 21 ms 13648 KB Output is correct
25 Correct 21 ms 13648 KB Output is correct
26 Correct 22 ms 13648 KB Output is correct
27 Correct 6 ms 7356 KB Output is correct
28 Correct 7 ms 7248 KB Output is correct
29 Correct 8 ms 7248 KB Output is correct
30 Correct 7 ms 7248 KB Output is correct
31 Correct 6 ms 7336 KB Output is correct
32 Correct 7 ms 7504 KB Output is correct
33 Correct 7 ms 7504 KB Output is correct
34 Correct 6 ms 7500 KB Output is correct
35 Correct 7 ms 7676 KB Output is correct
36 Correct 8 ms 9464 KB Output is correct
37 Correct 8 ms 8784 KB Output is correct
38 Correct 8 ms 8784 KB Output is correct
39 Correct 9 ms 9808 KB Output is correct
40 Correct 8 ms 9296 KB Output is correct
41 Correct 9 ms 9552 KB Output is correct
42 Correct 7 ms 7504 KB Output is correct
43 Correct 8 ms 9100 KB Output is correct
44 Correct 7 ms 7672 KB Output is correct
45 Correct 8 ms 9552 KB Output is correct
46 Correct 8 ms 9552 KB Output is correct
47 Correct 7 ms 7260 KB Output is correct
48 Correct 7 ms 7504 KB Output is correct
49 Correct 7 ms 7628 KB Output is correct
50 Correct 7 ms 7504 KB Output is correct
51 Correct 7 ms 7504 KB Output is correct
52 Correct 7 ms 7504 KB Output is correct
53 Correct 8 ms 9808 KB Output is correct
54 Correct 10 ms 9808 KB Output is correct
55 Correct 11 ms 9808 KB Output is correct
56 Correct 10 ms 9824 KB Output is correct
57 Correct 9 ms 9824 KB Output is correct
58 Correct 9 ms 9736 KB Output is correct
59 Correct 9 ms 9860 KB Output is correct
60 Correct 7 ms 7504 KB Output is correct
61 Correct 9 ms 9808 KB Output is correct
62 Correct 7 ms 7504 KB Output is correct
63 Correct 9 ms 9808 KB Output is correct
64 Correct 7 ms 7372 KB Output is correct
65 Correct 7 ms 7760 KB Output is correct
66 Correct 7 ms 7580 KB Output is correct
67 Correct 8 ms 8016 KB Output is correct
68 Correct 7 ms 8012 KB Output is correct
69 Correct 8 ms 8016 KB Output is correct
70 Correct 9 ms 9552 KB Output is correct
71 Correct 9 ms 9296 KB Output is correct
72 Correct 9 ms 9040 KB Output is correct
73 Correct 9 ms 9256 KB Output is correct
74 Correct 10 ms 9552 KB Output is correct
75 Correct 9 ms 9808 KB Output is correct
76 Correct 22 ms 11600 KB Output is correct
77 Correct 21 ms 12368 KB Output is correct
78 Correct 25 ms 13136 KB Output is correct
79 Correct 8 ms 8528 KB Output is correct
80 Correct 8 ms 8528 KB Output is correct
81 Correct 8 ms 8544 KB Output is correct
82 Correct 10 ms 8528 KB Output is correct
83 Correct 8 ms 8696 KB Output is correct
84 Correct 11 ms 10296 KB Output is correct
85 Correct 11 ms 10064 KB Output is correct
86 Correct 11 ms 10064 KB Output is correct
87 Correct 11 ms 10232 KB Output is correct
88 Correct 11 ms 10064 KB Output is correct
89 Correct 11 ms 10064 KB Output is correct
90 Correct 29 ms 13540 KB Output is correct
91 Correct 27 ms 13392 KB Output is correct
92 Correct 30 ms 13388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 7 ms 7308 KB Output is correct
3 Correct 7 ms 7248 KB Output is correct
4 Correct 7 ms 7476 KB Output is correct
5 Correct 6 ms 7248 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 6 ms 7248 KB Output is correct
8 Correct 8 ms 7248 KB Output is correct
9 Correct 6 ms 7464 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7248 KB Output is correct
12 Correct 6 ms 7248 KB Output is correct
13 Correct 6 ms 7248 KB Output is correct
14 Correct 7 ms 7300 KB Output is correct
15 Correct 8 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 13 ms 9808 KB Output is correct
18 Correct 8 ms 9808 KB Output is correct
19 Correct 8 ms 9808 KB Output is correct
20 Correct 8 ms 9808 KB Output is correct
21 Correct 9 ms 9976 KB Output is correct
22 Correct 10 ms 9824 KB Output is correct
23 Correct 9 ms 9808 KB Output is correct
24 Correct 21 ms 13648 KB Output is correct
25 Correct 21 ms 13648 KB Output is correct
26 Correct 22 ms 13648 KB Output is correct
27 Correct 9 ms 8184 KB Output is correct
28 Correct 9 ms 8156 KB Output is correct
29 Correct 10 ms 8016 KB Output is correct
30 Correct 9 ms 8216 KB Output is correct
31 Correct 11 ms 8016 KB Output is correct
32 Correct 9 ms 8184 KB Output is correct
33 Correct 13 ms 11088 KB Output is correct
34 Correct 13 ms 10888 KB Output is correct
35 Correct 13 ms 11000 KB Output is correct
36 Correct 13 ms 11044 KB Output is correct
37 Correct 13 ms 11092 KB Output is correct
38 Correct 13 ms 11044 KB Output is correct
39 Correct 26 ms 14416 KB Output is correct
40 Correct 28 ms 14416 KB Output is correct
41 Correct 25 ms 14416 KB Output is correct
42 Correct 6 ms 7356 KB Output is correct
43 Correct 7 ms 7248 KB Output is correct
44 Correct 8 ms 7248 KB Output is correct
45 Correct 7 ms 7248 KB Output is correct
46 Correct 6 ms 7336 KB Output is correct
47 Correct 7 ms 7504 KB Output is correct
48 Correct 7 ms 7504 KB Output is correct
49 Correct 6 ms 7500 KB Output is correct
50 Correct 7 ms 7676 KB Output is correct
51 Correct 8 ms 9464 KB Output is correct
52 Correct 8 ms 8784 KB Output is correct
53 Correct 8 ms 8784 KB Output is correct
54 Correct 9 ms 9808 KB Output is correct
55 Correct 8 ms 9296 KB Output is correct
56 Correct 9 ms 9552 KB Output is correct
57 Correct 7 ms 7504 KB Output is correct
58 Correct 8 ms 9100 KB Output is correct
59 Correct 7 ms 7672 KB Output is correct
60 Correct 8 ms 9552 KB Output is correct
61 Correct 8 ms 9552 KB Output is correct
62 Correct 7 ms 7260 KB Output is correct
63 Correct 7 ms 7504 KB Output is correct
64 Correct 7 ms 7628 KB Output is correct
65 Correct 7 ms 7504 KB Output is correct
66 Correct 7 ms 7504 KB Output is correct
67 Correct 7 ms 7504 KB Output is correct
68 Correct 8 ms 9808 KB Output is correct
69 Correct 10 ms 9808 KB Output is correct
70 Correct 11 ms 9808 KB Output is correct
71 Correct 10 ms 9824 KB Output is correct
72 Correct 9 ms 9824 KB Output is correct
73 Correct 9 ms 9736 KB Output is correct
74 Correct 9 ms 9860 KB Output is correct
75 Correct 7 ms 7504 KB Output is correct
76 Correct 9 ms 9808 KB Output is correct
77 Correct 7 ms 7504 KB Output is correct
78 Correct 9 ms 9808 KB Output is correct
79 Correct 7 ms 7372 KB Output is correct
80 Correct 7 ms 7760 KB Output is correct
81 Correct 7 ms 7580 KB Output is correct
82 Correct 8 ms 8016 KB Output is correct
83 Correct 7 ms 8012 KB Output is correct
84 Correct 8 ms 8016 KB Output is correct
85 Correct 9 ms 9552 KB Output is correct
86 Correct 9 ms 9296 KB Output is correct
87 Correct 9 ms 9040 KB Output is correct
88 Correct 9 ms 9256 KB Output is correct
89 Correct 10 ms 9552 KB Output is correct
90 Correct 9 ms 9808 KB Output is correct
91 Correct 22 ms 11600 KB Output is correct
92 Correct 21 ms 12368 KB Output is correct
93 Correct 25 ms 13136 KB Output is correct
94 Correct 8 ms 8528 KB Output is correct
95 Correct 8 ms 8528 KB Output is correct
96 Correct 8 ms 8544 KB Output is correct
97 Correct 10 ms 8528 KB Output is correct
98 Correct 8 ms 8696 KB Output is correct
99 Correct 11 ms 10296 KB Output is correct
100 Correct 11 ms 10064 KB Output is correct
101 Correct 11 ms 10064 KB Output is correct
102 Correct 11 ms 10232 KB Output is correct
103 Correct 11 ms 10064 KB Output is correct
104 Correct 11 ms 10064 KB Output is correct
105 Correct 29 ms 13540 KB Output is correct
106 Correct 27 ms 13392 KB Output is correct
107 Correct 30 ms 13388 KB Output is correct
108 Correct 10 ms 8016 KB Output is correct
109 Correct 138 ms 123592 KB Output is correct
110 Correct 107 ms 57928 KB Output is correct
111 Correct 95 ms 53576 KB Output is correct
112 Correct 109 ms 66144 KB Output is correct
113 Correct 65 ms 37192 KB Output is correct
114 Correct 19 ms 11344 KB Output is correct
115 Correct 17 ms 11356 KB Output is correct
116 Correct 18 ms 11868 KB Output is correct
117 Correct 18 ms 10832 KB Output is correct
118 Correct 20 ms 11592 KB Output is correct
119 Correct 17 ms 11088 KB Output is correct
120 Correct 22 ms 11856 KB Output is correct
121 Correct 11 ms 8784 KB Output is correct
122 Correct 26 ms 11864 KB Output is correct
123 Correct 12 ms 8528 KB Output is correct
124 Correct 26 ms 12876 KB Output is correct
125 Correct 18 ms 9296 KB Output is correct
126 Correct 13 ms 9760 KB Output is correct
127 Correct 13 ms 10632 KB Output is correct
128 Correct 12 ms 10064 KB Output is correct
129 Correct 12 ms 9564 KB Output is correct
130 Correct 9 ms 8016 KB Output is correct
131 Correct 191 ms 168008 KB Output is correct
132 Correct 194 ms 89816 KB Output is correct
133 Correct 173 ms 88820 KB Output is correct
134 Correct 152 ms 87624 KB Output is correct
135 Correct 140 ms 86580 KB Output is correct
136 Correct 20 ms 12124 KB Output is correct
137 Correct 20 ms 12112 KB Output is correct
138 Correct 20 ms 12164 KB Output is correct
139 Correct 20 ms 12112 KB Output is correct
140 Correct 20 ms 12112 KB Output is correct
141 Correct 20 ms 12112 KB Output is correct
142 Correct 35 ms 14416 KB Output is correct
143 Correct 14 ms 9552 KB Output is correct
144 Correct 32 ms 14424 KB Output is correct
145 Correct 14 ms 9552 KB Output is correct
146 Correct 32 ms 14572 KB Output is correct
147 Correct 14 ms 9720 KB Output is correct
148 Correct 14 ms 11088 KB Output is correct
149 Correct 14 ms 11088 KB Output is correct
150 Correct 15 ms 11088 KB Output is correct
151 Correct 14 ms 11088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 7 ms 7308 KB Output is correct
3 Correct 7 ms 7248 KB Output is correct
4 Correct 7 ms 7476 KB Output is correct
5 Correct 6 ms 7248 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 6 ms 7248 KB Output is correct
8 Correct 8 ms 7248 KB Output is correct
9 Correct 6 ms 7464 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7248 KB Output is correct
12 Correct 6 ms 7248 KB Output is correct
13 Correct 6 ms 7248 KB Output is correct
14 Correct 7 ms 7300 KB Output is correct
15 Correct 8 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 13 ms 9808 KB Output is correct
18 Correct 8 ms 9808 KB Output is correct
19 Correct 8 ms 9808 KB Output is correct
20 Correct 8 ms 9808 KB Output is correct
21 Correct 9 ms 9976 KB Output is correct
22 Correct 10 ms 9824 KB Output is correct
23 Correct 9 ms 9808 KB Output is correct
24 Correct 21 ms 13648 KB Output is correct
25 Correct 21 ms 13648 KB Output is correct
26 Correct 22 ms 13648 KB Output is correct
27 Correct 9 ms 8184 KB Output is correct
28 Correct 9 ms 8156 KB Output is correct
29 Correct 10 ms 8016 KB Output is correct
30 Correct 9 ms 8216 KB Output is correct
31 Correct 11 ms 8016 KB Output is correct
32 Correct 9 ms 8184 KB Output is correct
33 Correct 13 ms 11088 KB Output is correct
34 Correct 13 ms 10888 KB Output is correct
35 Correct 13 ms 11000 KB Output is correct
36 Correct 13 ms 11044 KB Output is correct
37 Correct 13 ms 11092 KB Output is correct
38 Correct 13 ms 11044 KB Output is correct
39 Correct 26 ms 14416 KB Output is correct
40 Correct 28 ms 14416 KB Output is correct
41 Correct 25 ms 14416 KB Output is correct
42 Correct 19 ms 11032 KB Output is correct
43 Correct 17 ms 9528 KB Output is correct
44 Correct 22 ms 11088 KB Output is correct
45 Correct 17 ms 9808 KB Output is correct
46 Correct 15 ms 9720 KB Output is correct
47 Correct 21 ms 11088 KB Output is correct
48 Correct 36 ms 19780 KB Output is correct
49 Correct 25 ms 15052 KB Output is correct
50 Correct 29 ms 17520 KB Output is correct
51 Correct 42 ms 19280 KB Output is correct
52 Correct 47 ms 19284 KB Output is correct
53 Correct 41 ms 16464 KB Output is correct
54 Correct 19 ms 11344 KB Output is correct
55 Correct 18 ms 11224 KB Output is correct
56 Correct 21 ms 11088 KB Output is correct
57 Correct 21 ms 11088 KB Output is correct
58 Correct 21 ms 11088 KB Output is correct
59 Correct 21 ms 11088 KB Output is correct
60 Correct 39 ms 20460 KB Output is correct
61 Correct 40 ms 20420 KB Output is correct
62 Correct 40 ms 20428 KB Output is correct
63 Correct 43 ms 20520 KB Output is correct
64 Correct 40 ms 20552 KB Output is correct
65 Correct 40 ms 20428 KB Output is correct
66 Correct 56 ms 22088 KB Output is correct
67 Correct 56 ms 22088 KB Output is correct
68 Correct 56 ms 22088 KB Output is correct
69 Correct 6 ms 7356 KB Output is correct
70 Correct 7 ms 7248 KB Output is correct
71 Correct 8 ms 7248 KB Output is correct
72 Correct 7 ms 7248 KB Output is correct
73 Correct 6 ms 7336 KB Output is correct
74 Correct 7 ms 7504 KB Output is correct
75 Correct 7 ms 7504 KB Output is correct
76 Correct 6 ms 7500 KB Output is correct
77 Correct 7 ms 7676 KB Output is correct
78 Correct 8 ms 9464 KB Output is correct
79 Correct 8 ms 8784 KB Output is correct
80 Correct 8 ms 8784 KB Output is correct
81 Correct 9 ms 9808 KB Output is correct
82 Correct 8 ms 9296 KB Output is correct
83 Correct 9 ms 9552 KB Output is correct
84 Correct 7 ms 7504 KB Output is correct
85 Correct 8 ms 9100 KB Output is correct
86 Correct 7 ms 7672 KB Output is correct
87 Correct 8 ms 9552 KB Output is correct
88 Correct 8 ms 9552 KB Output is correct
89 Correct 7 ms 7260 KB Output is correct
90 Correct 7 ms 7504 KB Output is correct
91 Correct 7 ms 7628 KB Output is correct
92 Correct 7 ms 7504 KB Output is correct
93 Correct 7 ms 7504 KB Output is correct
94 Correct 7 ms 7504 KB Output is correct
95 Correct 8 ms 9808 KB Output is correct
96 Correct 10 ms 9808 KB Output is correct
97 Correct 11 ms 9808 KB Output is correct
98 Correct 10 ms 9824 KB Output is correct
99 Correct 9 ms 9824 KB Output is correct
100 Correct 9 ms 9736 KB Output is correct
101 Correct 9 ms 9860 KB Output is correct
102 Correct 7 ms 7504 KB Output is correct
103 Correct 9 ms 9808 KB Output is correct
104 Correct 7 ms 7504 KB Output is correct
105 Correct 9 ms 9808 KB Output is correct
106 Correct 7 ms 7372 KB Output is correct
107 Correct 7 ms 7760 KB Output is correct
108 Correct 7 ms 7580 KB Output is correct
109 Correct 8 ms 8016 KB Output is correct
110 Correct 7 ms 8012 KB Output is correct
111 Correct 8 ms 8016 KB Output is correct
112 Correct 9 ms 9552 KB Output is correct
113 Correct 9 ms 9296 KB Output is correct
114 Correct 9 ms 9040 KB Output is correct
115 Correct 9 ms 9256 KB Output is correct
116 Correct 10 ms 9552 KB Output is correct
117 Correct 9 ms 9808 KB Output is correct
118 Correct 22 ms 11600 KB Output is correct
119 Correct 21 ms 12368 KB Output is correct
120 Correct 25 ms 13136 KB Output is correct
121 Correct 8 ms 8528 KB Output is correct
122 Correct 8 ms 8528 KB Output is correct
123 Correct 8 ms 8544 KB Output is correct
124 Correct 10 ms 8528 KB Output is correct
125 Correct 8 ms 8696 KB Output is correct
126 Correct 11 ms 10296 KB Output is correct
127 Correct 11 ms 10064 KB Output is correct
128 Correct 11 ms 10064 KB Output is correct
129 Correct 11 ms 10232 KB Output is correct
130 Correct 11 ms 10064 KB Output is correct
131 Correct 11 ms 10064 KB Output is correct
132 Correct 29 ms 13540 KB Output is correct
133 Correct 27 ms 13392 KB Output is correct
134 Correct 30 ms 13388 KB Output is correct
135 Correct 10 ms 8016 KB Output is correct
136 Correct 138 ms 123592 KB Output is correct
137 Correct 107 ms 57928 KB Output is correct
138 Correct 95 ms 53576 KB Output is correct
139 Correct 109 ms 66144 KB Output is correct
140 Correct 65 ms 37192 KB Output is correct
141 Correct 19 ms 11344 KB Output is correct
142 Correct 17 ms 11356 KB Output is correct
143 Correct 18 ms 11868 KB Output is correct
144 Correct 18 ms 10832 KB Output is correct
145 Correct 20 ms 11592 KB Output is correct
146 Correct 17 ms 11088 KB Output is correct
147 Correct 22 ms 11856 KB Output is correct
148 Correct 11 ms 8784 KB Output is correct
149 Correct 26 ms 11864 KB Output is correct
150 Correct 12 ms 8528 KB Output is correct
151 Correct 26 ms 12876 KB Output is correct
152 Correct 18 ms 9296 KB Output is correct
153 Correct 13 ms 9760 KB Output is correct
154 Correct 13 ms 10632 KB Output is correct
155 Correct 12 ms 10064 KB Output is correct
156 Correct 12 ms 9564 KB Output is correct
157 Correct 9 ms 8016 KB Output is correct
158 Correct 191 ms 168008 KB Output is correct
159 Correct 194 ms 89816 KB Output is correct
160 Correct 173 ms 88820 KB Output is correct
161 Correct 152 ms 87624 KB Output is correct
162 Correct 140 ms 86580 KB Output is correct
163 Correct 20 ms 12124 KB Output is correct
164 Correct 20 ms 12112 KB Output is correct
165 Correct 20 ms 12164 KB Output is correct
166 Correct 20 ms 12112 KB Output is correct
167 Correct 20 ms 12112 KB Output is correct
168 Correct 20 ms 12112 KB Output is correct
169 Correct 35 ms 14416 KB Output is correct
170 Correct 14 ms 9552 KB Output is correct
171 Correct 32 ms 14424 KB Output is correct
172 Correct 14 ms 9552 KB Output is correct
173 Correct 32 ms 14572 KB Output is correct
174 Correct 14 ms 9720 KB Output is correct
175 Correct 14 ms 11088 KB Output is correct
176 Correct 14 ms 11088 KB Output is correct
177 Correct 15 ms 11088 KB Output is correct
178 Correct 14 ms 11088 KB Output is correct
179 Correct 15 ms 9976 KB Output is correct
180 Correct 316 ms 218696 KB Output is correct
181 Correct 662 ms 311736 KB Output is correct
182 Correct 874 ms 407624 KB Output is correct
183 Correct 479 ms 259356 KB Output is correct
184 Correct 301 ms 135924 KB Output is correct
185 Correct 27 ms 13844 KB Output is correct
186 Correct 26 ms 15440 KB Output is correct
187 Correct 32 ms 15184 KB Output is correct
188 Correct 43 ms 16456 KB Output is correct
189 Correct 40 ms 16968 KB Output is correct
190 Correct 51 ms 17700 KB Output is correct
191 Correct 42 ms 17356 KB Output is correct
192 Correct 38 ms 14920 KB Output is correct
193 Correct 33 ms 14664 KB Output is correct
194 Correct 23 ms 11344 KB Output is correct
195 Runtime error 571 ms 524288 KB Execution killed with signal 9
196 Halted 0 ms 0 KB -