Submission #1106233

# Submission time Handle Problem Language Result Execution time Memory
1106233 2024-10-29T15:35:23 Z vladilius Painting Walls (APIO20_paint) C++17
63 / 100
549 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> T[n];
    for (int i = 0; i < n; i++){
        for (int j: d[x[i]]){
            T[i].pb(j);
            T[i].pb(j + m);
        }
        
        for (int j = 0; j < T[i].size(); j++) T[i][j] -= i;
    }
    
    vector<int> V[inf];
    for (int i = 0; i < n; i++){
        for (int j: T[i]){
            V[j + n].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:24:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for (int j = 0; j < T[i].size(); j++) T[i][j] -= i;
      |                         ~~^~~~~~~~~~~~~
paint.cpp:37:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   37 |         while (i < V[y].size()){
      |                ~~^~~~~~~~~~~~~
paint.cpp:39:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   39 |             while (j + 1 < V[y].size() && (V[y][j] + 1) == V[y][j + 1]) j++;
      |                    ~~~~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 6 ms 7248 KB Output is correct
3 Correct 6 ms 7428 KB Output is correct
4 Correct 6 ms 7248 KB Output is correct
5 Correct 7 ms 7480 KB Output is correct
6 Correct 9 ms 7248 KB Output is correct
7 Correct 6 ms 7504 KB Output is correct
8 Correct 7 ms 7504 KB Output is correct
9 Correct 7 ms 7504 KB Output is correct
10 Correct 6 ms 7504 KB Output is correct
11 Correct 7 ms 7504 KB Output is correct
12 Correct 7 ms 7672 KB Output is correct
13 Correct 9 ms 9808 KB Output is correct
14 Correct 8 ms 9808 KB Output is correct
15 Correct 9 ms 9808 KB Output is correct
16 Correct 9 ms 9808 KB Output is correct
17 Correct 9 ms 9808 KB Output is correct
18 Correct 9 ms 9808 KB Output is correct
19 Correct 9 ms 9972 KB Output is correct
20 Correct 8 ms 9808 KB Output is correct
21 Correct 8 ms 9808 KB Output is correct
22 Correct 21 ms 13672 KB Output is correct
23 Correct 22 ms 13648 KB Output is correct
24 Correct 21 ms 13648 KB Output is correct
25 Correct 10 ms 9296 KB Output is correct
26 Correct 11 ms 9296 KB Output is correct
27 Correct 11 ms 9224 KB Output is correct
28 Correct 11 ms 9296 KB Output is correct
29 Correct 11 ms 9296 KB Output is correct
30 Correct 11 ms 9052 KB Output is correct
31 Correct 15 ms 12232 KB Output is correct
32 Correct 15 ms 12112 KB Output is correct
33 Correct 15 ms 12112 KB Output is correct
34 Correct 20 ms 12112 KB Output is correct
35 Correct 15 ms 12112 KB Output is correct
36 Correct 15 ms 12112 KB Output is correct
37 Correct 27 ms 15580 KB Output is correct
38 Correct 27 ms 15696 KB Output is correct
39 Correct 27 ms 15616 KB Output is correct
40 Correct 25 ms 15944 KB Output is correct
41 Correct 18 ms 12624 KB Output is correct
42 Correct 32 ms 16464 KB Output is correct
43 Correct 24 ms 13392 KB Output is correct
44 Correct 22 ms 13052 KB Output is correct
45 Correct 30 ms 16456 KB Output is correct
46 Correct 51 ms 25540 KB Output is correct
47 Correct 33 ms 18884 KB Output is correct
48 Correct 35 ms 21452 KB Output is correct
49 Correct 48 ms 23632 KB Output is correct
50 Correct 57 ms 23880 KB Output is correct
51 Correct 44 ms 21412 KB Output is correct
52 Correct 27 ms 16988 KB Output is correct
53 Correct 27 ms 16976 KB Output is correct
54 Correct 29 ms 16720 KB Output is correct
55 Correct 30 ms 16720 KB Output is correct
56 Correct 30 ms 16888 KB Output is correct
57 Correct 29 ms 16720 KB Output is correct
58 Correct 54 ms 27324 KB Output is correct
59 Correct 49 ms 27272 KB Output is correct
60 Correct 49 ms 27116 KB Output is correct
61 Correct 49 ms 27248 KB Output is correct
62 Correct 49 ms 27272 KB Output is correct
63 Correct 48 ms 27264 KB Output is correct
64 Correct 63 ms 29000 KB Output is correct
65 Correct 64 ms 29000 KB Output is correct
66 Correct 70 ms 29000 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 6 ms 7248 KB Output is correct
3 Correct 6 ms 7428 KB Output is correct
4 Correct 6 ms 7248 KB Output is correct
5 Correct 7 ms 7480 KB Output is correct
6 Correct 9 ms 7248 KB Output is correct
7 Correct 6 ms 7504 KB Output is correct
8 Correct 7 ms 7504 KB Output is correct
9 Correct 7 ms 7504 KB Output is correct
10 Correct 6 ms 7504 KB Output is correct
11 Correct 7 ms 7504 KB Output is correct
12 Correct 7 ms 7672 KB Output is correct
13 Correct 9 ms 9808 KB Output is correct
14 Correct 8 ms 9808 KB Output is correct
15 Correct 9 ms 9808 KB Output is correct
16 Correct 9 ms 9808 KB Output is correct
17 Correct 9 ms 9808 KB Output is correct
18 Correct 9 ms 9808 KB Output is correct
19 Correct 9 ms 9972 KB Output is correct
20 Correct 8 ms 9808 KB Output is correct
21 Correct 8 ms 9808 KB Output is correct
22 Correct 6 ms 7248 KB Output is correct
23 Correct 6 ms 7248 KB Output is correct
24 Correct 6 ms 7248 KB Output is correct
25 Correct 8 ms 7248 KB Output is correct
26 Correct 6 ms 7248 KB Output is correct
27 Correct 7 ms 7504 KB Output is correct
28 Correct 7 ms 7524 KB Output is correct
29 Correct 7 ms 7676 KB Output is correct
30 Correct 7 ms 7504 KB Output is correct
31 Correct 7 ms 7668 KB Output is correct
32 Correct 7 ms 7504 KB Output is correct
33 Correct 8 ms 9296 KB Output is correct
34 Correct 11 ms 9040 KB Output is correct
35 Correct 8 ms 8784 KB Output is correct
36 Correct 8 ms 9828 KB Output is correct
37 Correct 8 ms 9296 KB Output is correct
38 Correct 8 ms 9388 KB Output is correct
39 Correct 7 ms 7504 KB Output is correct
40 Correct 8 ms 9092 KB Output is correct
41 Correct 7 ms 7504 KB Output is correct
42 Correct 8 ms 9552 KB Output is correct
43 Correct 8 ms 9500 KB Output is correct
44 Correct 7 ms 7504 KB Output is correct
45 Correct 7 ms 7760 KB Output is correct
46 Correct 7 ms 7760 KB Output is correct
47 Correct 7 ms 7504 KB Output is correct
48 Correct 7 ms 7504 KB Output is correct
49 Correct 8 ms 7504 KB Output is correct
50 Correct 8 ms 9808 KB Output is correct
51 Correct 8 ms 9808 KB Output is correct
52 Correct 10 ms 9808 KB Output is correct
53 Correct 8 ms 9808 KB Output is correct
54 Correct 8 ms 9876 KB Output is correct
55 Correct 9 ms 9808 KB Output is correct
56 Correct 8 ms 9808 KB Output is correct
57 Correct 7 ms 7504 KB Output is correct
58 Correct 8 ms 9896 KB Output is correct
59 Correct 7 ms 7504 KB Output is correct
60 Correct 9 ms 9980 KB Output is correct
61 Correct 7 ms 7516 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 6 ms 7248 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 7428 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 7 ms 7480 KB Output is correct
8 Correct 9 ms 7248 KB Output is correct
9 Correct 6 ms 7504 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7504 KB Output is correct
12 Correct 6 ms 7504 KB Output is correct
13 Correct 7 ms 7504 KB Output is correct
14 Correct 7 ms 7672 KB Output is correct
15 Correct 9 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 9 ms 9808 KB Output is correct
18 Correct 9 ms 9808 KB Output is correct
19 Correct 9 ms 9808 KB Output is correct
20 Correct 9 ms 9808 KB Output is correct
21 Correct 9 ms 9972 KB Output is correct
22 Correct 8 ms 9808 KB Output is correct
23 Correct 8 ms 9808 KB Output is correct
24 Correct 21 ms 13672 KB Output is correct
25 Correct 22 ms 13648 KB Output is correct
26 Correct 21 ms 13648 KB Output is correct
27 Correct 6 ms 7248 KB Output is correct
28 Correct 8 ms 7248 KB Output is correct
29 Correct 6 ms 7248 KB Output is correct
30 Correct 7 ms 7504 KB Output is correct
31 Correct 7 ms 7524 KB Output is correct
32 Correct 7 ms 7676 KB Output is correct
33 Correct 7 ms 7504 KB Output is correct
34 Correct 7 ms 7668 KB Output is correct
35 Correct 7 ms 7504 KB Output is correct
36 Correct 8 ms 9296 KB Output is correct
37 Correct 11 ms 9040 KB Output is correct
38 Correct 8 ms 8784 KB Output is correct
39 Correct 8 ms 9828 KB Output is correct
40 Correct 8 ms 9296 KB Output is correct
41 Correct 8 ms 9388 KB Output is correct
42 Correct 7 ms 7504 KB Output is correct
43 Correct 8 ms 9092 KB Output is correct
44 Correct 7 ms 7504 KB Output is correct
45 Correct 8 ms 9552 KB Output is correct
46 Correct 8 ms 9500 KB Output is correct
47 Correct 7 ms 7504 KB Output is correct
48 Correct 7 ms 7760 KB Output is correct
49 Correct 7 ms 7760 KB Output is correct
50 Correct 7 ms 7504 KB Output is correct
51 Correct 7 ms 7504 KB Output is correct
52 Correct 8 ms 7504 KB Output is correct
53 Correct 8 ms 9808 KB Output is correct
54 Correct 8 ms 9808 KB Output is correct
55 Correct 10 ms 9808 KB Output is correct
56 Correct 8 ms 9808 KB Output is correct
57 Correct 8 ms 9876 KB Output is correct
58 Correct 9 ms 9808 KB Output is correct
59 Correct 8 ms 9808 KB Output is correct
60 Correct 7 ms 7504 KB Output is correct
61 Correct 8 ms 9896 KB Output is correct
62 Correct 7 ms 7504 KB Output is correct
63 Correct 9 ms 9980 KB Output is correct
64 Correct 7 ms 7516 KB Output is correct
65 Correct 10 ms 8272 KB Output is correct
66 Correct 7 ms 7760 KB Output is correct
67 Correct 8 ms 8528 KB Output is correct
68 Correct 8 ms 8272 KB Output is correct
69 Correct 8 ms 8468 KB Output is correct
70 Correct 9 ms 9808 KB Output is correct
71 Correct 9 ms 9396 KB Output is correct
72 Correct 9 ms 9296 KB Output is correct
73 Correct 8 ms 9296 KB Output is correct
74 Correct 9 ms 9552 KB Output is correct
75 Correct 10 ms 10064 KB Output is correct
76 Correct 20 ms 11568 KB Output is correct
77 Correct 21 ms 12624 KB Output is correct
78 Correct 25 ms 13144 KB Output is correct
79 Correct 9 ms 9644 KB Output is correct
80 Correct 9 ms 9516 KB Output is correct
81 Correct 9 ms 9552 KB Output is correct
82 Correct 9 ms 9552 KB Output is correct
83 Correct 9 ms 9552 KB Output is correct
84 Correct 10 ms 10492 KB Output is correct
85 Correct 10 ms 10344 KB Output is correct
86 Correct 10 ms 10352 KB Output is correct
87 Correct 10 ms 10320 KB Output is correct
88 Correct 10 ms 10552 KB Output is correct
89 Correct 10 ms 10320 KB Output is correct
90 Correct 27 ms 13392 KB Output is correct
91 Correct 26 ms 13392 KB Output is correct
92 Correct 27 ms 13436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 6 ms 7248 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 7428 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 7 ms 7480 KB Output is correct
8 Correct 9 ms 7248 KB Output is correct
9 Correct 6 ms 7504 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7504 KB Output is correct
12 Correct 6 ms 7504 KB Output is correct
13 Correct 7 ms 7504 KB Output is correct
14 Correct 7 ms 7672 KB Output is correct
15 Correct 9 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 9 ms 9808 KB Output is correct
18 Correct 9 ms 9808 KB Output is correct
19 Correct 9 ms 9808 KB Output is correct
20 Correct 9 ms 9808 KB Output is correct
21 Correct 9 ms 9972 KB Output is correct
22 Correct 8 ms 9808 KB Output is correct
23 Correct 8 ms 9808 KB Output is correct
24 Correct 21 ms 13672 KB Output is correct
25 Correct 22 ms 13648 KB Output is correct
26 Correct 21 ms 13648 KB Output is correct
27 Correct 10 ms 9296 KB Output is correct
28 Correct 11 ms 9296 KB Output is correct
29 Correct 11 ms 9224 KB Output is correct
30 Correct 11 ms 9296 KB Output is correct
31 Correct 11 ms 9296 KB Output is correct
32 Correct 11 ms 9052 KB Output is correct
33 Correct 15 ms 12232 KB Output is correct
34 Correct 15 ms 12112 KB Output is correct
35 Correct 15 ms 12112 KB Output is correct
36 Correct 20 ms 12112 KB Output is correct
37 Correct 15 ms 12112 KB Output is correct
38 Correct 15 ms 12112 KB Output is correct
39 Correct 27 ms 15580 KB Output is correct
40 Correct 27 ms 15696 KB Output is correct
41 Correct 27 ms 15616 KB Output is correct
42 Correct 6 ms 7248 KB Output is correct
43 Correct 8 ms 7248 KB Output is correct
44 Correct 6 ms 7248 KB Output is correct
45 Correct 7 ms 7504 KB Output is correct
46 Correct 7 ms 7524 KB Output is correct
47 Correct 7 ms 7676 KB Output is correct
48 Correct 7 ms 7504 KB Output is correct
49 Correct 7 ms 7668 KB Output is correct
50 Correct 7 ms 7504 KB Output is correct
51 Correct 8 ms 9296 KB Output is correct
52 Correct 11 ms 9040 KB Output is correct
53 Correct 8 ms 8784 KB Output is correct
54 Correct 8 ms 9828 KB Output is correct
55 Correct 8 ms 9296 KB Output is correct
56 Correct 8 ms 9388 KB Output is correct
57 Correct 7 ms 7504 KB Output is correct
58 Correct 8 ms 9092 KB Output is correct
59 Correct 7 ms 7504 KB Output is correct
60 Correct 8 ms 9552 KB Output is correct
61 Correct 8 ms 9500 KB Output is correct
62 Correct 7 ms 7504 KB Output is correct
63 Correct 7 ms 7760 KB Output is correct
64 Correct 7 ms 7760 KB Output is correct
65 Correct 7 ms 7504 KB Output is correct
66 Correct 7 ms 7504 KB Output is correct
67 Correct 8 ms 7504 KB Output is correct
68 Correct 8 ms 9808 KB Output is correct
69 Correct 8 ms 9808 KB Output is correct
70 Correct 10 ms 9808 KB Output is correct
71 Correct 8 ms 9808 KB Output is correct
72 Correct 8 ms 9876 KB Output is correct
73 Correct 9 ms 9808 KB Output is correct
74 Correct 8 ms 9808 KB Output is correct
75 Correct 7 ms 7504 KB Output is correct
76 Correct 8 ms 9896 KB Output is correct
77 Correct 7 ms 7504 KB Output is correct
78 Correct 9 ms 9980 KB Output is correct
79 Correct 7 ms 7516 KB Output is correct
80 Correct 10 ms 8272 KB Output is correct
81 Correct 7 ms 7760 KB Output is correct
82 Correct 8 ms 8528 KB Output is correct
83 Correct 8 ms 8272 KB Output is correct
84 Correct 8 ms 8468 KB Output is correct
85 Correct 9 ms 9808 KB Output is correct
86 Correct 9 ms 9396 KB Output is correct
87 Correct 9 ms 9296 KB Output is correct
88 Correct 8 ms 9296 KB Output is correct
89 Correct 9 ms 9552 KB Output is correct
90 Correct 10 ms 10064 KB Output is correct
91 Correct 20 ms 11568 KB Output is correct
92 Correct 21 ms 12624 KB Output is correct
93 Correct 25 ms 13144 KB Output is correct
94 Correct 9 ms 9644 KB Output is correct
95 Correct 9 ms 9516 KB Output is correct
96 Correct 9 ms 9552 KB Output is correct
97 Correct 9 ms 9552 KB Output is correct
98 Correct 9 ms 9552 KB Output is correct
99 Correct 10 ms 10492 KB Output is correct
100 Correct 10 ms 10344 KB Output is correct
101 Correct 10 ms 10352 KB Output is correct
102 Correct 10 ms 10320 KB Output is correct
103 Correct 10 ms 10552 KB Output is correct
104 Correct 10 ms 10320 KB Output is correct
105 Correct 27 ms 13392 KB Output is correct
106 Correct 26 ms 13392 KB Output is correct
107 Correct 27 ms 13436 KB Output is correct
108 Correct 11 ms 9296 KB Output is correct
109 Correct 238 ms 240356 KB Output is correct
110 Correct 152 ms 107592 KB Output is correct
111 Correct 134 ms 100172 KB Output is correct
112 Correct 160 ms 128444 KB Output is correct
113 Correct 104 ms 67656 KB Output is correct
114 Correct 18 ms 12624 KB Output is correct
115 Correct 20 ms 12368 KB Output is correct
116 Correct 21 ms 13304 KB Output is correct
117 Correct 18 ms 11856 KB Output is correct
118 Correct 20 ms 12880 KB Output is correct
119 Correct 17 ms 12112 KB Output is correct
120 Correct 22 ms 12432 KB Output is correct
121 Correct 13 ms 9296 KB Output is correct
122 Correct 25 ms 12368 KB Output is correct
123 Correct 12 ms 9300 KB Output is correct
124 Correct 28 ms 13904 KB Output is correct
125 Correct 15 ms 10320 KB Output is correct
126 Correct 14 ms 10576 KB Output is correct
127 Correct 15 ms 11600 KB Output is correct
128 Correct 14 ms 10824 KB Output is correct
129 Correct 13 ms 10320 KB Output is correct
130 Correct 11 ms 9296 KB Output is correct
131 Correct 338 ms 329152 KB Output is correct
132 Correct 270 ms 170580 KB Output is correct
133 Correct 264 ms 169656 KB Output is correct
134 Correct 222 ms 168516 KB Output is correct
135 Correct 206 ms 159560 KB Output is correct
136 Correct 23 ms 13388 KB Output is correct
137 Correct 22 ms 13392 KB Output is correct
138 Correct 23 ms 13392 KB Output is correct
139 Correct 23 ms 13392 KB Output is correct
140 Correct 23 ms 13528 KB Output is correct
141 Correct 22 ms 13392 KB Output is correct
142 Correct 34 ms 15440 KB Output is correct
143 Correct 16 ms 10588 KB Output is correct
144 Correct 33 ms 15436 KB Output is correct
145 Correct 16 ms 10576 KB Output is correct
146 Correct 34 ms 15440 KB Output is correct
147 Correct 16 ms 10576 KB Output is correct
148 Correct 17 ms 12368 KB Output is correct
149 Correct 23 ms 12280 KB Output is correct
150 Correct 16 ms 12368 KB Output is correct
151 Correct 16 ms 12112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 7248 KB Output is correct
2 Correct 6 ms 7248 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 7428 KB Output is correct
6 Correct 6 ms 7248 KB Output is correct
7 Correct 7 ms 7480 KB Output is correct
8 Correct 9 ms 7248 KB Output is correct
9 Correct 6 ms 7504 KB Output is correct
10 Correct 7 ms 7504 KB Output is correct
11 Correct 7 ms 7504 KB Output is correct
12 Correct 6 ms 7504 KB Output is correct
13 Correct 7 ms 7504 KB Output is correct
14 Correct 7 ms 7672 KB Output is correct
15 Correct 9 ms 9808 KB Output is correct
16 Correct 8 ms 9808 KB Output is correct
17 Correct 9 ms 9808 KB Output is correct
18 Correct 9 ms 9808 KB Output is correct
19 Correct 9 ms 9808 KB Output is correct
20 Correct 9 ms 9808 KB Output is correct
21 Correct 9 ms 9972 KB Output is correct
22 Correct 8 ms 9808 KB Output is correct
23 Correct 8 ms 9808 KB Output is correct
24 Correct 21 ms 13672 KB Output is correct
25 Correct 22 ms 13648 KB Output is correct
26 Correct 21 ms 13648 KB Output is correct
27 Correct 10 ms 9296 KB Output is correct
28 Correct 11 ms 9296 KB Output is correct
29 Correct 11 ms 9224 KB Output is correct
30 Correct 11 ms 9296 KB Output is correct
31 Correct 11 ms 9296 KB Output is correct
32 Correct 11 ms 9052 KB Output is correct
33 Correct 15 ms 12232 KB Output is correct
34 Correct 15 ms 12112 KB Output is correct
35 Correct 15 ms 12112 KB Output is correct
36 Correct 20 ms 12112 KB Output is correct
37 Correct 15 ms 12112 KB Output is correct
38 Correct 15 ms 12112 KB Output is correct
39 Correct 27 ms 15580 KB Output is correct
40 Correct 27 ms 15696 KB Output is correct
41 Correct 27 ms 15616 KB Output is correct
42 Correct 25 ms 15944 KB Output is correct
43 Correct 18 ms 12624 KB Output is correct
44 Correct 32 ms 16464 KB Output is correct
45 Correct 24 ms 13392 KB Output is correct
46 Correct 22 ms 13052 KB Output is correct
47 Correct 30 ms 16456 KB Output is correct
48 Correct 51 ms 25540 KB Output is correct
49 Correct 33 ms 18884 KB Output is correct
50 Correct 35 ms 21452 KB Output is correct
51 Correct 48 ms 23632 KB Output is correct
52 Correct 57 ms 23880 KB Output is correct
53 Correct 44 ms 21412 KB Output is correct
54 Correct 27 ms 16988 KB Output is correct
55 Correct 27 ms 16976 KB Output is correct
56 Correct 29 ms 16720 KB Output is correct
57 Correct 30 ms 16720 KB Output is correct
58 Correct 30 ms 16888 KB Output is correct
59 Correct 29 ms 16720 KB Output is correct
60 Correct 54 ms 27324 KB Output is correct
61 Correct 49 ms 27272 KB Output is correct
62 Correct 49 ms 27116 KB Output is correct
63 Correct 49 ms 27248 KB Output is correct
64 Correct 49 ms 27272 KB Output is correct
65 Correct 48 ms 27264 KB Output is correct
66 Correct 63 ms 29000 KB Output is correct
67 Correct 64 ms 29000 KB Output is correct
68 Correct 70 ms 29000 KB Output is correct
69 Correct 6 ms 7248 KB Output is correct
70 Correct 8 ms 7248 KB Output is correct
71 Correct 6 ms 7248 KB Output is correct
72 Correct 7 ms 7504 KB Output is correct
73 Correct 7 ms 7524 KB Output is correct
74 Correct 7 ms 7676 KB Output is correct
75 Correct 7 ms 7504 KB Output is correct
76 Correct 7 ms 7668 KB Output is correct
77 Correct 7 ms 7504 KB Output is correct
78 Correct 8 ms 9296 KB Output is correct
79 Correct 11 ms 9040 KB Output is correct
80 Correct 8 ms 8784 KB Output is correct
81 Correct 8 ms 9828 KB Output is correct
82 Correct 8 ms 9296 KB Output is correct
83 Correct 8 ms 9388 KB Output is correct
84 Correct 7 ms 7504 KB Output is correct
85 Correct 8 ms 9092 KB Output is correct
86 Correct 7 ms 7504 KB Output is correct
87 Correct 8 ms 9552 KB Output is correct
88 Correct 8 ms 9500 KB Output is correct
89 Correct 7 ms 7504 KB Output is correct
90 Correct 7 ms 7760 KB Output is correct
91 Correct 7 ms 7760 KB Output is correct
92 Correct 7 ms 7504 KB Output is correct
93 Correct 7 ms 7504 KB Output is correct
94 Correct 8 ms 7504 KB Output is correct
95 Correct 8 ms 9808 KB Output is correct
96 Correct 8 ms 9808 KB Output is correct
97 Correct 10 ms 9808 KB Output is correct
98 Correct 8 ms 9808 KB Output is correct
99 Correct 8 ms 9876 KB Output is correct
100 Correct 9 ms 9808 KB Output is correct
101 Correct 8 ms 9808 KB Output is correct
102 Correct 7 ms 7504 KB Output is correct
103 Correct 8 ms 9896 KB Output is correct
104 Correct 7 ms 7504 KB Output is correct
105 Correct 9 ms 9980 KB Output is correct
106 Correct 7 ms 7516 KB Output is correct
107 Correct 10 ms 8272 KB Output is correct
108 Correct 7 ms 7760 KB Output is correct
109 Correct 8 ms 8528 KB Output is correct
110 Correct 8 ms 8272 KB Output is correct
111 Correct 8 ms 8468 KB Output is correct
112 Correct 9 ms 9808 KB Output is correct
113 Correct 9 ms 9396 KB Output is correct
114 Correct 9 ms 9296 KB Output is correct
115 Correct 8 ms 9296 KB Output is correct
116 Correct 9 ms 9552 KB Output is correct
117 Correct 10 ms 10064 KB Output is correct
118 Correct 20 ms 11568 KB Output is correct
119 Correct 21 ms 12624 KB Output is correct
120 Correct 25 ms 13144 KB Output is correct
121 Correct 9 ms 9644 KB Output is correct
122 Correct 9 ms 9516 KB Output is correct
123 Correct 9 ms 9552 KB Output is correct
124 Correct 9 ms 9552 KB Output is correct
125 Correct 9 ms 9552 KB Output is correct
126 Correct 10 ms 10492 KB Output is correct
127 Correct 10 ms 10344 KB Output is correct
128 Correct 10 ms 10352 KB Output is correct
129 Correct 10 ms 10320 KB Output is correct
130 Correct 10 ms 10552 KB Output is correct
131 Correct 10 ms 10320 KB Output is correct
132 Correct 27 ms 13392 KB Output is correct
133 Correct 26 ms 13392 KB Output is correct
134 Correct 27 ms 13436 KB Output is correct
135 Correct 11 ms 9296 KB Output is correct
136 Correct 238 ms 240356 KB Output is correct
137 Correct 152 ms 107592 KB Output is correct
138 Correct 134 ms 100172 KB Output is correct
139 Correct 160 ms 128444 KB Output is correct
140 Correct 104 ms 67656 KB Output is correct
141 Correct 18 ms 12624 KB Output is correct
142 Correct 20 ms 12368 KB Output is correct
143 Correct 21 ms 13304 KB Output is correct
144 Correct 18 ms 11856 KB Output is correct
145 Correct 20 ms 12880 KB Output is correct
146 Correct 17 ms 12112 KB Output is correct
147 Correct 22 ms 12432 KB Output is correct
148 Correct 13 ms 9296 KB Output is correct
149 Correct 25 ms 12368 KB Output is correct
150 Correct 12 ms 9300 KB Output is correct
151 Correct 28 ms 13904 KB Output is correct
152 Correct 15 ms 10320 KB Output is correct
153 Correct 14 ms 10576 KB Output is correct
154 Correct 15 ms 11600 KB Output is correct
155 Correct 14 ms 10824 KB Output is correct
156 Correct 13 ms 10320 KB Output is correct
157 Correct 11 ms 9296 KB Output is correct
158 Correct 338 ms 329152 KB Output is correct
159 Correct 270 ms 170580 KB Output is correct
160 Correct 264 ms 169656 KB Output is correct
161 Correct 222 ms 168516 KB Output is correct
162 Correct 206 ms 159560 KB Output is correct
163 Correct 23 ms 13388 KB Output is correct
164 Correct 22 ms 13392 KB Output is correct
165 Correct 23 ms 13392 KB Output is correct
166 Correct 23 ms 13392 KB Output is correct
167 Correct 23 ms 13528 KB Output is correct
168 Correct 22 ms 13392 KB Output is correct
169 Correct 34 ms 15440 KB Output is correct
170 Correct 16 ms 10588 KB Output is correct
171 Correct 33 ms 15436 KB Output is correct
172 Correct 16 ms 10576 KB Output is correct
173 Correct 34 ms 15440 KB Output is correct
174 Correct 16 ms 10576 KB Output is correct
175 Correct 17 ms 12368 KB Output is correct
176 Correct 23 ms 12280 KB Output is correct
177 Correct 16 ms 12368 KB Output is correct
178 Correct 16 ms 12112 KB Output is correct
179 Correct 25 ms 13236 KB Output is correct
180 Correct 549 ms 429304 KB Output is correct
181 Runtime error 547 ms 524288 KB Execution killed with signal 9
182 Halted 0 ms 0 KB -