답안 #724126

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
724126 2023-04-14T18:18:33 Z danikoynov 벽 칠하기 (APIO20_paint) C++14
51 / 100
1500 ms 168432 KB
#include "paint.h"

#include <bits/stdc++.h>
using namespace std;

const int maxn = 1e5 + 10, maxk = 1e5 + 10;

int dp[maxn], c[maxn], a[maxn], n, m;
vector < int > b[maxn], col[maxn];
vector < pair < int, int > > path[maxn];
int minimumInstructions(
    int N, int M, int K, vector<int> C,
    vector<int> A, vector<vector<int>> B)
{

    n = N;
    m = M;
    for (int i = 0; i < n; i ++)
    {
        c[i] = C[i];
    }

    for (int i = 0; i < m; i ++)
    {
                a[i] = A[i];
        for (int j = 0; j < a[i]; j ++)
        {
            b[i].push_back(B[i][j]);
            col[b[i][j]].push_back(i);
        }
    }

    for (int i = 0; i < N; i ++)
        dp[i] = 1e9;
    for (int i = N - 1; i >= 0; i --)
    {
        for (int idx : col[c[i]])
        path[i].push_back({idx, 1});
    }

    for (int i = N - 1; i >= 0; i --)
    {
        /**bool tf = false;
        for (int st = 0; st < M; st ++)
        {
            bool is_pos = true;
            for (int pos = 0; pos < M; pos ++)
            {
                if (col[c[i + pos]][(st + pos) % M] == 0)
                {
                    ///cout << "break " << pos << endl;
                    is_pos = false;
                    break;
                }
            }
            if (is_pos)
            {
                ///cout << i << " " << st << endl;
                tf = true;
                break;
            }
        }*/

        bool tf = false;
        int pt = 0;
        for (int j = 0; j < path[i].size(); j ++)
        {
            while(pt < path[i + 1].size() && path[i + 1][pt].first <= path[i][j].first)
                pt ++;

            if (pt != path[i + 1].size() && path[i + 1][pt].first == path[i][j].first + 1)
                path[i][j].second = max(path[i][j].second, min(path[i + 1][pt].second + 1, m));
            if (path[i][j].first == M - 1)
            {
                if (path[i + 1].size() > 0 && path[i + 1][0].first == 0)
                {
                path[i][j].second = max(path[i][j].second, min(path[i + 1][0].second + 1, m));
                }
            }

            if (path[i][j].second == m)
                tf = true;

            ///cout << i << " : " << path[i][j].first << " " << path[i][j].second << endl;
        }



        if (tf)
        {
            for (int j = i + 1; j <= i + M; j ++)
                dp[i] = min(dp[i], dp[j] + 1);

        }
    }

    if (dp[0] > N)
    return -1;
    return dp[0];
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:66:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 |         for (int j = 0; j < path[i].size(); j ++)
      |                         ~~^~~~~~~~~~~~~~~~
paint.cpp:68:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |             while(pt < path[i + 1].size() && path[i + 1][pt].first <= path[i][j].first)
      |                   ~~~^~~~~~~~~~~~~~~~~~~~
paint.cpp:71:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   71 |             if (pt != path[i + 1].size() && path[i + 1][pt].first == path[i][j].first + 1)
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 5 ms 7252 KB Output is correct
4 Correct 5 ms 7252 KB Output is correct
5 Correct 4 ms 7252 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 5 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 5 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 5 ms 7380 KB Output is correct
16 Correct 5 ms 7368 KB Output is correct
17 Correct 6 ms 7432 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 5 ms 7380 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 29 ms 12356 KB Output is correct
23 Correct 26 ms 12276 KB Output is correct
24 Correct 25 ms 12360 KB Output is correct
25 Correct 7 ms 8276 KB Output is correct
26 Correct 7 ms 8244 KB Output is correct
27 Correct 7 ms 8240 KB Output is correct
28 Correct 7 ms 8264 KB Output is correct
29 Correct 8 ms 8276 KB Output is correct
30 Correct 7 ms 8276 KB Output is correct
31 Correct 57 ms 9592 KB Output is correct
32 Correct 71 ms 9556 KB Output is correct
33 Correct 58 ms 9600 KB Output is correct
34 Correct 59 ms 9540 KB Output is correct
35 Correct 55 ms 9592 KB Output is correct
36 Correct 58 ms 9556 KB Output is correct
37 Correct 32 ms 13512 KB Output is correct
38 Correct 33 ms 13504 KB Output is correct
39 Correct 36 ms 13564 KB Output is correct
40 Correct 15 ms 11720 KB Output is correct
41 Correct 12 ms 10052 KB Output is correct
42 Correct 18 ms 12116 KB Output is correct
43 Correct 13 ms 10440 KB Output is correct
44 Correct 12 ms 10184 KB Output is correct
45 Correct 18 ms 12176 KB Output is correct
46 Execution timed out 1582 ms 22524 KB Time limit exceeded
47 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 5 ms 7252 KB Output is correct
4 Correct 5 ms 7252 KB Output is correct
5 Correct 4 ms 7252 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 5 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 5 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 5 ms 7380 KB Output is correct
16 Correct 5 ms 7368 KB Output is correct
17 Correct 6 ms 7432 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 5 ms 7380 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 4 ms 7252 KB Output is correct
23 Correct 5 ms 7252 KB Output is correct
24 Correct 4 ms 7348 KB Output is correct
25 Correct 5 ms 7352 KB Output is correct
26 Correct 5 ms 7356 KB Output is correct
27 Correct 5 ms 7312 KB Output is correct
28 Correct 6 ms 7352 KB Output is correct
29 Correct 5 ms 7356 KB Output is correct
30 Correct 5 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7348 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 5 ms 7352 KB Output is correct
36 Correct 5 ms 7380 KB Output is correct
37 Correct 5 ms 7356 KB Output is correct
38 Correct 5 ms 7380 KB Output is correct
39 Correct 4 ms 7380 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 6 ms 7380 KB Output is correct
42 Correct 5 ms 7352 KB Output is correct
43 Correct 4 ms 7316 KB Output is correct
44 Correct 5 ms 7380 KB Output is correct
45 Correct 5 ms 7636 KB Output is correct
46 Correct 4 ms 7508 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 5 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7356 KB Output is correct
52 Correct 5 ms 7352 KB Output is correct
53 Correct 4 ms 7352 KB Output is correct
54 Correct 4 ms 7380 KB Output is correct
55 Correct 4 ms 7380 KB Output is correct
56 Correct 4 ms 7380 KB Output is correct
57 Correct 5 ms 7352 KB Output is correct
58 Correct 5 ms 7380 KB Output is correct
59 Correct 5 ms 7380 KB Output is correct
60 Correct 5 ms 7380 KB Output is correct
61 Correct 5 ms 7356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 5 ms 7252 KB Output is correct
3 Correct 4 ms 7252 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 5 ms 7252 KB Output is correct
6 Correct 5 ms 7252 KB Output is correct
7 Correct 4 ms 7252 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 5 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 5 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 5 ms 7380 KB Output is correct
18 Correct 5 ms 7368 KB Output is correct
19 Correct 6 ms 7432 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 5 ms 7380 KB Output is correct
24 Correct 29 ms 12356 KB Output is correct
25 Correct 26 ms 12276 KB Output is correct
26 Correct 25 ms 12360 KB Output is correct
27 Correct 4 ms 7348 KB Output is correct
28 Correct 5 ms 7352 KB Output is correct
29 Correct 5 ms 7356 KB Output is correct
30 Correct 5 ms 7312 KB Output is correct
31 Correct 6 ms 7352 KB Output is correct
32 Correct 5 ms 7356 KB Output is correct
33 Correct 5 ms 7380 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7348 KB Output is correct
37 Correct 4 ms 7380 KB Output is correct
38 Correct 5 ms 7352 KB Output is correct
39 Correct 5 ms 7380 KB Output is correct
40 Correct 5 ms 7356 KB Output is correct
41 Correct 5 ms 7380 KB Output is correct
42 Correct 4 ms 7380 KB Output is correct
43 Correct 4 ms 7380 KB Output is correct
44 Correct 6 ms 7380 KB Output is correct
45 Correct 5 ms 7352 KB Output is correct
46 Correct 4 ms 7316 KB Output is correct
47 Correct 5 ms 7380 KB Output is correct
48 Correct 5 ms 7636 KB Output is correct
49 Correct 4 ms 7508 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 5 ms 7380 KB Output is correct
52 Correct 4 ms 7380 KB Output is correct
53 Correct 4 ms 7380 KB Output is correct
54 Correct 4 ms 7356 KB Output is correct
55 Correct 5 ms 7352 KB Output is correct
56 Correct 4 ms 7352 KB Output is correct
57 Correct 4 ms 7380 KB Output is correct
58 Correct 4 ms 7380 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 5 ms 7352 KB Output is correct
61 Correct 5 ms 7380 KB Output is correct
62 Correct 5 ms 7380 KB Output is correct
63 Correct 5 ms 7380 KB Output is correct
64 Correct 5 ms 7356 KB Output is correct
65 Correct 5 ms 7864 KB Output is correct
66 Correct 5 ms 7508 KB Output is correct
67 Correct 6 ms 7892 KB Output is correct
68 Correct 7 ms 7924 KB Output is correct
69 Correct 6 ms 7736 KB Output is correct
70 Correct 7 ms 7764 KB Output is correct
71 Correct 8 ms 7764 KB Output is correct
72 Correct 7 ms 7744 KB Output is correct
73 Correct 5 ms 7488 KB Output is correct
74 Correct 6 ms 7620 KB Output is correct
75 Correct 6 ms 7628 KB Output is correct
76 Correct 23 ms 11084 KB Output is correct
77 Correct 21 ms 11616 KB Output is correct
78 Correct 34 ms 12284 KB Output is correct
79 Correct 6 ms 8404 KB Output is correct
80 Correct 6 ms 8372 KB Output is correct
81 Correct 6 ms 8404 KB Output is correct
82 Correct 7 ms 8404 KB Output is correct
83 Correct 7 ms 8404 KB Output is correct
84 Correct 7 ms 7892 KB Output is correct
85 Correct 7 ms 7892 KB Output is correct
86 Correct 7 ms 7872 KB Output is correct
87 Correct 6 ms 7840 KB Output is correct
88 Correct 6 ms 7876 KB Output is correct
89 Correct 6 ms 7872 KB Output is correct
90 Correct 36 ms 12748 KB Output is correct
91 Correct 53 ms 12804 KB Output is correct
92 Correct 35 ms 12784 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 5 ms 7252 KB Output is correct
3 Correct 4 ms 7252 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 5 ms 7252 KB Output is correct
6 Correct 5 ms 7252 KB Output is correct
7 Correct 4 ms 7252 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 5 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 5 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 5 ms 7380 KB Output is correct
18 Correct 5 ms 7368 KB Output is correct
19 Correct 6 ms 7432 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 5 ms 7380 KB Output is correct
24 Correct 29 ms 12356 KB Output is correct
25 Correct 26 ms 12276 KB Output is correct
26 Correct 25 ms 12360 KB Output is correct
27 Correct 7 ms 8276 KB Output is correct
28 Correct 7 ms 8244 KB Output is correct
29 Correct 7 ms 8240 KB Output is correct
30 Correct 7 ms 8264 KB Output is correct
31 Correct 8 ms 8276 KB Output is correct
32 Correct 7 ms 8276 KB Output is correct
33 Correct 57 ms 9592 KB Output is correct
34 Correct 71 ms 9556 KB Output is correct
35 Correct 58 ms 9600 KB Output is correct
36 Correct 59 ms 9540 KB Output is correct
37 Correct 55 ms 9592 KB Output is correct
38 Correct 58 ms 9556 KB Output is correct
39 Correct 32 ms 13512 KB Output is correct
40 Correct 33 ms 13504 KB Output is correct
41 Correct 36 ms 13564 KB Output is correct
42 Correct 4 ms 7348 KB Output is correct
43 Correct 5 ms 7352 KB Output is correct
44 Correct 5 ms 7356 KB Output is correct
45 Correct 5 ms 7312 KB Output is correct
46 Correct 6 ms 7352 KB Output is correct
47 Correct 5 ms 7356 KB Output is correct
48 Correct 5 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7348 KB Output is correct
52 Correct 4 ms 7380 KB Output is correct
53 Correct 5 ms 7352 KB Output is correct
54 Correct 5 ms 7380 KB Output is correct
55 Correct 5 ms 7356 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 4 ms 7380 KB Output is correct
58 Correct 4 ms 7380 KB Output is correct
59 Correct 6 ms 7380 KB Output is correct
60 Correct 5 ms 7352 KB Output is correct
61 Correct 4 ms 7316 KB Output is correct
62 Correct 5 ms 7380 KB Output is correct
63 Correct 5 ms 7636 KB Output is correct
64 Correct 4 ms 7508 KB Output is correct
65 Correct 4 ms 7380 KB Output is correct
66 Correct 5 ms 7380 KB Output is correct
67 Correct 4 ms 7380 KB Output is correct
68 Correct 4 ms 7380 KB Output is correct
69 Correct 4 ms 7356 KB Output is correct
70 Correct 5 ms 7352 KB Output is correct
71 Correct 4 ms 7352 KB Output is correct
72 Correct 4 ms 7380 KB Output is correct
73 Correct 4 ms 7380 KB Output is correct
74 Correct 4 ms 7380 KB Output is correct
75 Correct 5 ms 7352 KB Output is correct
76 Correct 5 ms 7380 KB Output is correct
77 Correct 5 ms 7380 KB Output is correct
78 Correct 5 ms 7380 KB Output is correct
79 Correct 5 ms 7356 KB Output is correct
80 Correct 5 ms 7864 KB Output is correct
81 Correct 5 ms 7508 KB Output is correct
82 Correct 6 ms 7892 KB Output is correct
83 Correct 7 ms 7924 KB Output is correct
84 Correct 6 ms 7736 KB Output is correct
85 Correct 7 ms 7764 KB Output is correct
86 Correct 8 ms 7764 KB Output is correct
87 Correct 7 ms 7744 KB Output is correct
88 Correct 5 ms 7488 KB Output is correct
89 Correct 6 ms 7620 KB Output is correct
90 Correct 6 ms 7628 KB Output is correct
91 Correct 23 ms 11084 KB Output is correct
92 Correct 21 ms 11616 KB Output is correct
93 Correct 34 ms 12284 KB Output is correct
94 Correct 6 ms 8404 KB Output is correct
95 Correct 6 ms 8372 KB Output is correct
96 Correct 6 ms 8404 KB Output is correct
97 Correct 7 ms 8404 KB Output is correct
98 Correct 7 ms 8404 KB Output is correct
99 Correct 7 ms 7892 KB Output is correct
100 Correct 7 ms 7892 KB Output is correct
101 Correct 7 ms 7872 KB Output is correct
102 Correct 6 ms 7840 KB Output is correct
103 Correct 6 ms 7876 KB Output is correct
104 Correct 6 ms 7872 KB Output is correct
105 Correct 36 ms 12748 KB Output is correct
106 Correct 53 ms 12804 KB Output is correct
107 Correct 35 ms 12784 KB Output is correct
108 Correct 7 ms 8256 KB Output is correct
109 Correct 187 ms 124276 KB Output is correct
110 Correct 101 ms 57012 KB Output is correct
111 Correct 92 ms 54064 KB Output is correct
112 Correct 107 ms 69644 KB Output is correct
113 Correct 66 ms 37836 KB Output is correct
114 Correct 31 ms 10176 KB Output is correct
115 Correct 18 ms 9928 KB Output is correct
116 Correct 35 ms 10564 KB Output is correct
117 Correct 29 ms 10196 KB Output is correct
118 Correct 21 ms 10452 KB Output is correct
119 Correct 39 ms 9660 KB Output is correct
120 Correct 24 ms 11348 KB Output is correct
121 Correct 32 ms 8644 KB Output is correct
122 Correct 24 ms 11712 KB Output is correct
123 Correct 16 ms 8404 KB Output is correct
124 Correct 34 ms 12520 KB Output is correct
125 Correct 16 ms 9044 KB Output is correct
126 Correct 15 ms 9036 KB Output is correct
127 Correct 14 ms 9428 KB Output is correct
128 Correct 12 ms 8892 KB Output is correct
129 Correct 13 ms 8916 KB Output is correct
130 Correct 8 ms 8276 KB Output is correct
131 Correct 281 ms 168432 KB Output is correct
132 Correct 186 ms 88196 KB Output is correct
133 Correct 174 ms 88308 KB Output is correct
134 Correct 153 ms 88388 KB Output is correct
135 Correct 149 ms 80332 KB Output is correct
136 Correct 67 ms 11092 KB Output is correct
137 Correct 69 ms 11088 KB Output is correct
138 Correct 72 ms 11084 KB Output is correct
139 Correct 72 ms 11084 KB Output is correct
140 Correct 88 ms 11052 KB Output is correct
141 Correct 72 ms 11100 KB Output is correct
142 Correct 40 ms 14028 KB Output is correct
143 Correct 58 ms 9416 KB Output is correct
144 Correct 43 ms 14136 KB Output is correct
145 Correct 58 ms 9464 KB Output is correct
146 Correct 46 ms 14080 KB Output is correct
147 Correct 56 ms 9464 KB Output is correct
148 Correct 16 ms 9792 KB Output is correct
149 Correct 15 ms 9704 KB Output is correct
150 Correct 16 ms 9592 KB Output is correct
151 Correct 14 ms 9540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 5 ms 7252 KB Output is correct
3 Correct 4 ms 7252 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 5 ms 7252 KB Output is correct
6 Correct 5 ms 7252 KB Output is correct
7 Correct 4 ms 7252 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 5 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 5 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 5 ms 7380 KB Output is correct
18 Correct 5 ms 7368 KB Output is correct
19 Correct 6 ms 7432 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 5 ms 7380 KB Output is correct
24 Correct 29 ms 12356 KB Output is correct
25 Correct 26 ms 12276 KB Output is correct
26 Correct 25 ms 12360 KB Output is correct
27 Correct 7 ms 8276 KB Output is correct
28 Correct 7 ms 8244 KB Output is correct
29 Correct 7 ms 8240 KB Output is correct
30 Correct 7 ms 8264 KB Output is correct
31 Correct 8 ms 8276 KB Output is correct
32 Correct 7 ms 8276 KB Output is correct
33 Correct 57 ms 9592 KB Output is correct
34 Correct 71 ms 9556 KB Output is correct
35 Correct 58 ms 9600 KB Output is correct
36 Correct 59 ms 9540 KB Output is correct
37 Correct 55 ms 9592 KB Output is correct
38 Correct 58 ms 9556 KB Output is correct
39 Correct 32 ms 13512 KB Output is correct
40 Correct 33 ms 13504 KB Output is correct
41 Correct 36 ms 13564 KB Output is correct
42 Correct 15 ms 11720 KB Output is correct
43 Correct 12 ms 10052 KB Output is correct
44 Correct 18 ms 12116 KB Output is correct
45 Correct 13 ms 10440 KB Output is correct
46 Correct 12 ms 10184 KB Output is correct
47 Correct 18 ms 12176 KB Output is correct
48 Execution timed out 1582 ms 22524 KB Time limit exceeded
49 Halted 0 ms 0 KB -