답안 #1106261

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1106261 2024-10-29T16:52:11 Z vladilius 벽 칠하기 (APIO20_paint) C++17
40 / 100
1500 ms 18772 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;

struct ST{
    vector<int> t;
    int n;
    ST(int ns){
        n = ns;
        t.resize(4 * n);
    }
    void upd(int v, int tl, int tr, int& p, int& x){
        if (tl == tr){
            t[v] += x;
            return;
        }
        int tm = (tl + tr) / 2, vv = 2 * v;
        if (p <= tm){
            upd(vv, tl, tm, p, x);
        }
        else {
            upd(vv + 1, tm + 1, tr, p, x);
        }
        t[v] = max(t[vv], t[vv + 1]);
    }
    void upd(int p, int x){
        p++;
        upd(1, 1, n, p, x);
    }
    int get(){
        return t[1];
    }
};

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> p(n + 1);
    int i = 0, j = 0, j1 = 0; 
    ST T(inf);
    while (i < n){
        if (T.get() == (j1 - i)){
            j = j1;
            // [i, j1 - 1]
            while (j < n){
                for (int f: d[x[j]]){
                    T.upd(f - j + n, 1);
                    T.upd(f - j + (m + n), 1);
                }
                if (T.get() != (j - i + 1)){
                    j1++;
                    break;
                }
                j++; j1++;
            }
            
            if (i <= (j - m)){
                p[i]++;
                p[j - m + 1]--;
            }
        }
        
        for (int f: d[x[i]]){
            T.upd(f - i + n, -1);
            T.upd(f - i + (m + n), -1);
        }
        i++;
    }
    
    vector<bool> gd(n);
    int sum = 0;
    for (int i = 0; i < n; i++){
        sum += p[i];
        gd[i] = (sum > 0);
    }
    
    int mx = -1, t = -1, out = 0;
    for (int i = 0; i < n; i++){
        if (gd[i]) t = i;
        if (i == (mx + 1)){
            if (t == -1) return -1;
            mx = t + m - 1;
            t = -1;
            out++;
        }
    }
    return out;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4944 KB Output is correct
2 Correct 1 ms 4944 KB Output is correct
3 Correct 2 ms 4944 KB Output is correct
4 Correct 1 ms 4944 KB Output is correct
5 Correct 2 ms 4944 KB Output is correct
6 Correct 1 ms 4944 KB Output is correct
7 Correct 2 ms 4944 KB Output is correct
8 Correct 2 ms 4944 KB Output is correct
9 Correct 2 ms 5052 KB Output is correct
10 Correct 2 ms 4944 KB Output is correct
11 Correct 1 ms 5060 KB Output is correct
12 Correct 2 ms 5112 KB Output is correct
13 Correct 3 ms 7448 KB Output is correct
14 Correct 4 ms 7504 KB Output is correct
15 Correct 3 ms 7504 KB Output is correct
16 Correct 3 ms 7504 KB Output is correct
17 Correct 3 ms 7312 KB Output is correct
18 Correct 4 ms 7672 KB Output is correct
19 Correct 4 ms 7504 KB Output is correct
20 Correct 5 ms 7504 KB Output is correct
21 Correct 4 ms 7504 KB Output is correct
22 Correct 16 ms 11180 KB Output is correct
23 Correct 16 ms 11344 KB Output is correct
24 Correct 17 ms 11256 KB Output is correct
25 Correct 8 ms 5200 KB Output is correct
26 Correct 9 ms 5368 KB Output is correct
27 Correct 9 ms 5200 KB Output is correct
28 Correct 8 ms 5200 KB Output is correct
29 Correct 9 ms 5200 KB Output is correct
30 Correct 8 ms 5212 KB Output is correct
31 Correct 14 ms 8572 KB Output is correct
32 Correct 12 ms 8784 KB Output is correct
33 Correct 12 ms 8528 KB Output is correct
34 Correct 13 ms 8528 KB Output is correct
35 Correct 13 ms 8528 KB Output is correct
36 Correct 16 ms 8528 KB Output is correct
37 Correct 27 ms 11600 KB Output is correct
38 Correct 29 ms 11856 KB Output is correct
39 Correct 27 ms 11600 KB Output is correct
40 Correct 33 ms 6172 KB Output is correct
41 Correct 19 ms 5712 KB Output is correct
42 Correct 33 ms 6296 KB Output is correct
43 Correct 22 ms 5712 KB Output is correct
44 Correct 20 ms 5712 KB Output is correct
45 Correct 33 ms 6368 KB Output is correct
46 Correct 47 ms 16720 KB Output is correct
47 Correct 30 ms 12368 KB Output is correct
48 Correct 33 ms 15396 KB Output is correct
49 Correct 55 ms 14960 KB Output is correct
50 Correct 61 ms 14664 KB Output is correct
51 Correct 58 ms 12000 KB Output is correct
52 Correct 34 ms 6504 KB Output is correct
53 Correct 33 ms 6480 KB Output is correct
54 Correct 34 ms 6224 KB Output is correct
55 Correct 33 ms 6224 KB Output is correct
56 Correct 33 ms 6224 KB Output is correct
57 Correct 33 ms 6224 KB Output is correct
58 Correct 50 ms 17488 KB Output is correct
59 Correct 51 ms 17480 KB Output is correct
60 Correct 55 ms 18772 KB Output is correct
61 Correct 51 ms 17488 KB Output is correct
62 Correct 67 ms 18760 KB Output is correct
63 Correct 51 ms 18656 KB Output is correct
64 Correct 79 ms 17124 KB Output is correct
65 Correct 79 ms 16728 KB Output is correct
66 Correct 79 ms 16720 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4944 KB Output is correct
2 Correct 1 ms 4944 KB Output is correct
3 Correct 2 ms 4944 KB Output is correct
4 Correct 1 ms 4944 KB Output is correct
5 Correct 2 ms 4944 KB Output is correct
6 Correct 1 ms 4944 KB Output is correct
7 Correct 2 ms 4944 KB Output is correct
8 Correct 2 ms 4944 KB Output is correct
9 Correct 2 ms 5052 KB Output is correct
10 Correct 2 ms 4944 KB Output is correct
11 Correct 1 ms 5060 KB Output is correct
12 Correct 2 ms 5112 KB Output is correct
13 Correct 3 ms 7448 KB Output is correct
14 Correct 4 ms 7504 KB Output is correct
15 Correct 3 ms 7504 KB Output is correct
16 Correct 3 ms 7504 KB Output is correct
17 Correct 3 ms 7312 KB Output is correct
18 Correct 4 ms 7672 KB Output is correct
19 Correct 4 ms 7504 KB Output is correct
20 Correct 5 ms 7504 KB Output is correct
21 Correct 4 ms 7504 KB Output is correct
22 Correct 2 ms 4944 KB Output is correct
23 Correct 1 ms 4944 KB Output is correct
24 Correct 1 ms 4944 KB Output is correct
25 Correct 1 ms 4944 KB Output is correct
26 Correct 1 ms 4944 KB Output is correct
27 Correct 2 ms 4944 KB Output is correct
28 Correct 3 ms 4944 KB Output is correct
29 Correct 3 ms 4944 KB Output is correct
30 Correct 3 ms 4944 KB Output is correct
31 Correct 2 ms 4944 KB Output is correct
32 Correct 2 ms 4944 KB Output is correct
33 Correct 3 ms 6992 KB Output is correct
34 Correct 3 ms 6480 KB Output is correct
35 Correct 2 ms 6224 KB Output is correct
36 Correct 3 ms 7248 KB Output is correct
37 Correct 3 ms 6992 KB Output is correct
38 Correct 3 ms 7212 KB Output is correct
39 Correct 2 ms 5112 KB Output is correct
40 Correct 3 ms 6736 KB Output is correct
41 Correct 1 ms 4944 KB Output is correct
42 Correct 3 ms 7248 KB Output is correct
43 Correct 3 ms 7248 KB Output is correct
44 Correct 2 ms 4944 KB Output is correct
45 Correct 4 ms 4944 KB Output is correct
46 Correct 4 ms 4944 KB Output is correct
47 Correct 3 ms 4944 KB Output is correct
48 Correct 3 ms 4944 KB Output is correct
49 Correct 3 ms 4944 KB Output is correct
50 Correct 4 ms 7504 KB Output is correct
51 Correct 4 ms 7504 KB Output is correct
52 Correct 3 ms 7504 KB Output is correct
53 Correct 3 ms 7504 KB Output is correct
54 Correct 4 ms 7672 KB Output is correct
55 Correct 4 ms 7292 KB Output is correct
56 Correct 4 ms 7504 KB Output is correct
57 Correct 2 ms 4944 KB Output is correct
58 Correct 4 ms 7504 KB Output is correct
59 Correct 2 ms 4944 KB Output is correct
60 Correct 5 ms 7324 KB Output is correct
61 Correct 2 ms 4944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4944 KB Output is correct
2 Correct 1 ms 4944 KB Output is correct
3 Correct 2 ms 4944 KB Output is correct
4 Correct 1 ms 4944 KB Output is correct
5 Correct 2 ms 4944 KB Output is correct
6 Correct 1 ms 4944 KB Output is correct
7 Correct 2 ms 4944 KB Output is correct
8 Correct 1 ms 4944 KB Output is correct
9 Correct 2 ms 4944 KB Output is correct
10 Correct 2 ms 4944 KB Output is correct
11 Correct 2 ms 5052 KB Output is correct
12 Correct 2 ms 4944 KB Output is correct
13 Correct 1 ms 5060 KB Output is correct
14 Correct 2 ms 5112 KB Output is correct
15 Correct 3 ms 7448 KB Output is correct
16 Correct 4 ms 7504 KB Output is correct
17 Correct 3 ms 7504 KB Output is correct
18 Correct 3 ms 7504 KB Output is correct
19 Correct 3 ms 7312 KB Output is correct
20 Correct 4 ms 7672 KB Output is correct
21 Correct 4 ms 7504 KB Output is correct
22 Correct 5 ms 7504 KB Output is correct
23 Correct 4 ms 7504 KB Output is correct
24 Correct 16 ms 11180 KB Output is correct
25 Correct 16 ms 11344 KB Output is correct
26 Correct 17 ms 11256 KB Output is correct
27 Correct 1 ms 4944 KB Output is correct
28 Correct 1 ms 4944 KB Output is correct
29 Correct 1 ms 4944 KB Output is correct
30 Correct 2 ms 4944 KB Output is correct
31 Correct 3 ms 4944 KB Output is correct
32 Correct 3 ms 4944 KB Output is correct
33 Correct 3 ms 4944 KB Output is correct
34 Correct 2 ms 4944 KB Output is correct
35 Correct 2 ms 4944 KB Output is correct
36 Correct 3 ms 6992 KB Output is correct
37 Correct 3 ms 6480 KB Output is correct
38 Correct 2 ms 6224 KB Output is correct
39 Correct 3 ms 7248 KB Output is correct
40 Correct 3 ms 6992 KB Output is correct
41 Correct 3 ms 7212 KB Output is correct
42 Correct 2 ms 5112 KB Output is correct
43 Correct 3 ms 6736 KB Output is correct
44 Correct 1 ms 4944 KB Output is correct
45 Correct 3 ms 7248 KB Output is correct
46 Correct 3 ms 7248 KB Output is correct
47 Correct 2 ms 4944 KB Output is correct
48 Correct 4 ms 4944 KB Output is correct
49 Correct 4 ms 4944 KB Output is correct
50 Correct 3 ms 4944 KB Output is correct
51 Correct 3 ms 4944 KB Output is correct
52 Correct 3 ms 4944 KB Output is correct
53 Correct 4 ms 7504 KB Output is correct
54 Correct 4 ms 7504 KB Output is correct
55 Correct 3 ms 7504 KB Output is correct
56 Correct 3 ms 7504 KB Output is correct
57 Correct 4 ms 7672 KB Output is correct
58 Correct 4 ms 7292 KB Output is correct
59 Correct 4 ms 7504 KB Output is correct
60 Correct 2 ms 4944 KB Output is correct
61 Correct 4 ms 7504 KB Output is correct
62 Correct 2 ms 4944 KB Output is correct
63 Correct 5 ms 7324 KB Output is correct
64 Correct 2 ms 4944 KB Output is correct
65 Correct 9 ms 4944 KB Output is correct
66 Correct 5 ms 4944 KB Output is correct
67 Correct 11 ms 4944 KB Output is correct
68 Correct 7 ms 4944 KB Output is correct
69 Correct 10 ms 4944 KB Output is correct
70 Correct 6 ms 7248 KB Output is correct
71 Correct 6 ms 6736 KB Output is correct
72 Correct 5 ms 6492 KB Output is correct
73 Correct 5 ms 6736 KB Output is correct
74 Correct 5 ms 7088 KB Output is correct
75 Correct 6 ms 7504 KB Output is correct
76 Correct 16 ms 9396 KB Output is correct
77 Correct 16 ms 10320 KB Output is correct
78 Correct 24 ms 10804 KB Output is correct
79 Correct 18 ms 4944 KB Output is correct
80 Correct 18 ms 4944 KB Output is correct
81 Correct 19 ms 4944 KB Output is correct
82 Correct 19 ms 4944 KB Output is correct
83 Correct 18 ms 4944 KB Output is correct
84 Correct 7 ms 7504 KB Output is correct
85 Correct 7 ms 7632 KB Output is correct
86 Correct 7 ms 7504 KB Output is correct
87 Correct 7 ms 7504 KB Output is correct
88 Correct 7 ms 7504 KB Output is correct
89 Correct 7 ms 7504 KB Output is correct
90 Correct 22 ms 11260 KB Output is correct
91 Correct 21 ms 11032 KB Output is correct
92 Correct 23 ms 11088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4944 KB Output is correct
2 Correct 1 ms 4944 KB Output is correct
3 Correct 2 ms 4944 KB Output is correct
4 Correct 1 ms 4944 KB Output is correct
5 Correct 2 ms 4944 KB Output is correct
6 Correct 1 ms 4944 KB Output is correct
7 Correct 2 ms 4944 KB Output is correct
8 Correct 1 ms 4944 KB Output is correct
9 Correct 2 ms 4944 KB Output is correct
10 Correct 2 ms 4944 KB Output is correct
11 Correct 2 ms 5052 KB Output is correct
12 Correct 2 ms 4944 KB Output is correct
13 Correct 1 ms 5060 KB Output is correct
14 Correct 2 ms 5112 KB Output is correct
15 Correct 3 ms 7448 KB Output is correct
16 Correct 4 ms 7504 KB Output is correct
17 Correct 3 ms 7504 KB Output is correct
18 Correct 3 ms 7504 KB Output is correct
19 Correct 3 ms 7312 KB Output is correct
20 Correct 4 ms 7672 KB Output is correct
21 Correct 4 ms 7504 KB Output is correct
22 Correct 5 ms 7504 KB Output is correct
23 Correct 4 ms 7504 KB Output is correct
24 Correct 16 ms 11180 KB Output is correct
25 Correct 16 ms 11344 KB Output is correct
26 Correct 17 ms 11256 KB Output is correct
27 Correct 8 ms 5200 KB Output is correct
28 Correct 9 ms 5368 KB Output is correct
29 Correct 9 ms 5200 KB Output is correct
30 Correct 8 ms 5200 KB Output is correct
31 Correct 9 ms 5200 KB Output is correct
32 Correct 8 ms 5212 KB Output is correct
33 Correct 14 ms 8572 KB Output is correct
34 Correct 12 ms 8784 KB Output is correct
35 Correct 12 ms 8528 KB Output is correct
36 Correct 13 ms 8528 KB Output is correct
37 Correct 13 ms 8528 KB Output is correct
38 Correct 16 ms 8528 KB Output is correct
39 Correct 27 ms 11600 KB Output is correct
40 Correct 29 ms 11856 KB Output is correct
41 Correct 27 ms 11600 KB Output is correct
42 Correct 1 ms 4944 KB Output is correct
43 Correct 1 ms 4944 KB Output is correct
44 Correct 1 ms 4944 KB Output is correct
45 Correct 2 ms 4944 KB Output is correct
46 Correct 3 ms 4944 KB Output is correct
47 Correct 3 ms 4944 KB Output is correct
48 Correct 3 ms 4944 KB Output is correct
49 Correct 2 ms 4944 KB Output is correct
50 Correct 2 ms 4944 KB Output is correct
51 Correct 3 ms 6992 KB Output is correct
52 Correct 3 ms 6480 KB Output is correct
53 Correct 2 ms 6224 KB Output is correct
54 Correct 3 ms 7248 KB Output is correct
55 Correct 3 ms 6992 KB Output is correct
56 Correct 3 ms 7212 KB Output is correct
57 Correct 2 ms 5112 KB Output is correct
58 Correct 3 ms 6736 KB Output is correct
59 Correct 1 ms 4944 KB Output is correct
60 Correct 3 ms 7248 KB Output is correct
61 Correct 3 ms 7248 KB Output is correct
62 Correct 2 ms 4944 KB Output is correct
63 Correct 4 ms 4944 KB Output is correct
64 Correct 4 ms 4944 KB Output is correct
65 Correct 3 ms 4944 KB Output is correct
66 Correct 3 ms 4944 KB Output is correct
67 Correct 3 ms 4944 KB Output is correct
68 Correct 4 ms 7504 KB Output is correct
69 Correct 4 ms 7504 KB Output is correct
70 Correct 3 ms 7504 KB Output is correct
71 Correct 3 ms 7504 KB Output is correct
72 Correct 4 ms 7672 KB Output is correct
73 Correct 4 ms 7292 KB Output is correct
74 Correct 4 ms 7504 KB Output is correct
75 Correct 2 ms 4944 KB Output is correct
76 Correct 4 ms 7504 KB Output is correct
77 Correct 2 ms 4944 KB Output is correct
78 Correct 5 ms 7324 KB Output is correct
79 Correct 2 ms 4944 KB Output is correct
80 Correct 9 ms 4944 KB Output is correct
81 Correct 5 ms 4944 KB Output is correct
82 Correct 11 ms 4944 KB Output is correct
83 Correct 7 ms 4944 KB Output is correct
84 Correct 10 ms 4944 KB Output is correct
85 Correct 6 ms 7248 KB Output is correct
86 Correct 6 ms 6736 KB Output is correct
87 Correct 5 ms 6492 KB Output is correct
88 Correct 5 ms 6736 KB Output is correct
89 Correct 5 ms 7088 KB Output is correct
90 Correct 6 ms 7504 KB Output is correct
91 Correct 16 ms 9396 KB Output is correct
92 Correct 16 ms 10320 KB Output is correct
93 Correct 24 ms 10804 KB Output is correct
94 Correct 18 ms 4944 KB Output is correct
95 Correct 18 ms 4944 KB Output is correct
96 Correct 19 ms 4944 KB Output is correct
97 Correct 19 ms 4944 KB Output is correct
98 Correct 18 ms 4944 KB Output is correct
99 Correct 7 ms 7504 KB Output is correct
100 Correct 7 ms 7632 KB Output is correct
101 Correct 7 ms 7504 KB Output is correct
102 Correct 7 ms 7504 KB Output is correct
103 Correct 7 ms 7504 KB Output is correct
104 Correct 7 ms 7504 KB Output is correct
105 Correct 22 ms 11260 KB Output is correct
106 Correct 21 ms 11032 KB Output is correct
107 Correct 23 ms 11088 KB Output is correct
108 Correct 12 ms 5200 KB Output is correct
109 Execution timed out 1562 ms 5308 KB Time limit exceeded
110 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4944 KB Output is correct
2 Correct 1 ms 4944 KB Output is correct
3 Correct 2 ms 4944 KB Output is correct
4 Correct 1 ms 4944 KB Output is correct
5 Correct 2 ms 4944 KB Output is correct
6 Correct 1 ms 4944 KB Output is correct
7 Correct 2 ms 4944 KB Output is correct
8 Correct 1 ms 4944 KB Output is correct
9 Correct 2 ms 4944 KB Output is correct
10 Correct 2 ms 4944 KB Output is correct
11 Correct 2 ms 5052 KB Output is correct
12 Correct 2 ms 4944 KB Output is correct
13 Correct 1 ms 5060 KB Output is correct
14 Correct 2 ms 5112 KB Output is correct
15 Correct 3 ms 7448 KB Output is correct
16 Correct 4 ms 7504 KB Output is correct
17 Correct 3 ms 7504 KB Output is correct
18 Correct 3 ms 7504 KB Output is correct
19 Correct 3 ms 7312 KB Output is correct
20 Correct 4 ms 7672 KB Output is correct
21 Correct 4 ms 7504 KB Output is correct
22 Correct 5 ms 7504 KB Output is correct
23 Correct 4 ms 7504 KB Output is correct
24 Correct 16 ms 11180 KB Output is correct
25 Correct 16 ms 11344 KB Output is correct
26 Correct 17 ms 11256 KB Output is correct
27 Correct 8 ms 5200 KB Output is correct
28 Correct 9 ms 5368 KB Output is correct
29 Correct 9 ms 5200 KB Output is correct
30 Correct 8 ms 5200 KB Output is correct
31 Correct 9 ms 5200 KB Output is correct
32 Correct 8 ms 5212 KB Output is correct
33 Correct 14 ms 8572 KB Output is correct
34 Correct 12 ms 8784 KB Output is correct
35 Correct 12 ms 8528 KB Output is correct
36 Correct 13 ms 8528 KB Output is correct
37 Correct 13 ms 8528 KB Output is correct
38 Correct 16 ms 8528 KB Output is correct
39 Correct 27 ms 11600 KB Output is correct
40 Correct 29 ms 11856 KB Output is correct
41 Correct 27 ms 11600 KB Output is correct
42 Correct 33 ms 6172 KB Output is correct
43 Correct 19 ms 5712 KB Output is correct
44 Correct 33 ms 6296 KB Output is correct
45 Correct 22 ms 5712 KB Output is correct
46 Correct 20 ms 5712 KB Output is correct
47 Correct 33 ms 6368 KB Output is correct
48 Correct 47 ms 16720 KB Output is correct
49 Correct 30 ms 12368 KB Output is correct
50 Correct 33 ms 15396 KB Output is correct
51 Correct 55 ms 14960 KB Output is correct
52 Correct 61 ms 14664 KB Output is correct
53 Correct 58 ms 12000 KB Output is correct
54 Correct 34 ms 6504 KB Output is correct
55 Correct 33 ms 6480 KB Output is correct
56 Correct 34 ms 6224 KB Output is correct
57 Correct 33 ms 6224 KB Output is correct
58 Correct 33 ms 6224 KB Output is correct
59 Correct 33 ms 6224 KB Output is correct
60 Correct 50 ms 17488 KB Output is correct
61 Correct 51 ms 17480 KB Output is correct
62 Correct 55 ms 18772 KB Output is correct
63 Correct 51 ms 17488 KB Output is correct
64 Correct 67 ms 18760 KB Output is correct
65 Correct 51 ms 18656 KB Output is correct
66 Correct 79 ms 17124 KB Output is correct
67 Correct 79 ms 16728 KB Output is correct
68 Correct 79 ms 16720 KB Output is correct
69 Correct 1 ms 4944 KB Output is correct
70 Correct 1 ms 4944 KB Output is correct
71 Correct 1 ms 4944 KB Output is correct
72 Correct 2 ms 4944 KB Output is correct
73 Correct 3 ms 4944 KB Output is correct
74 Correct 3 ms 4944 KB Output is correct
75 Correct 3 ms 4944 KB Output is correct
76 Correct 2 ms 4944 KB Output is correct
77 Correct 2 ms 4944 KB Output is correct
78 Correct 3 ms 6992 KB Output is correct
79 Correct 3 ms 6480 KB Output is correct
80 Correct 2 ms 6224 KB Output is correct
81 Correct 3 ms 7248 KB Output is correct
82 Correct 3 ms 6992 KB Output is correct
83 Correct 3 ms 7212 KB Output is correct
84 Correct 2 ms 5112 KB Output is correct
85 Correct 3 ms 6736 KB Output is correct
86 Correct 1 ms 4944 KB Output is correct
87 Correct 3 ms 7248 KB Output is correct
88 Correct 3 ms 7248 KB Output is correct
89 Correct 2 ms 4944 KB Output is correct
90 Correct 4 ms 4944 KB Output is correct
91 Correct 4 ms 4944 KB Output is correct
92 Correct 3 ms 4944 KB Output is correct
93 Correct 3 ms 4944 KB Output is correct
94 Correct 3 ms 4944 KB Output is correct
95 Correct 4 ms 7504 KB Output is correct
96 Correct 4 ms 7504 KB Output is correct
97 Correct 3 ms 7504 KB Output is correct
98 Correct 3 ms 7504 KB Output is correct
99 Correct 4 ms 7672 KB Output is correct
100 Correct 4 ms 7292 KB Output is correct
101 Correct 4 ms 7504 KB Output is correct
102 Correct 2 ms 4944 KB Output is correct
103 Correct 4 ms 7504 KB Output is correct
104 Correct 2 ms 4944 KB Output is correct
105 Correct 5 ms 7324 KB Output is correct
106 Correct 2 ms 4944 KB Output is correct
107 Correct 9 ms 4944 KB Output is correct
108 Correct 5 ms 4944 KB Output is correct
109 Correct 11 ms 4944 KB Output is correct
110 Correct 7 ms 4944 KB Output is correct
111 Correct 10 ms 4944 KB Output is correct
112 Correct 6 ms 7248 KB Output is correct
113 Correct 6 ms 6736 KB Output is correct
114 Correct 5 ms 6492 KB Output is correct
115 Correct 5 ms 6736 KB Output is correct
116 Correct 5 ms 7088 KB Output is correct
117 Correct 6 ms 7504 KB Output is correct
118 Correct 16 ms 9396 KB Output is correct
119 Correct 16 ms 10320 KB Output is correct
120 Correct 24 ms 10804 KB Output is correct
121 Correct 18 ms 4944 KB Output is correct
122 Correct 18 ms 4944 KB Output is correct
123 Correct 19 ms 4944 KB Output is correct
124 Correct 19 ms 4944 KB Output is correct
125 Correct 18 ms 4944 KB Output is correct
126 Correct 7 ms 7504 KB Output is correct
127 Correct 7 ms 7632 KB Output is correct
128 Correct 7 ms 7504 KB Output is correct
129 Correct 7 ms 7504 KB Output is correct
130 Correct 7 ms 7504 KB Output is correct
131 Correct 7 ms 7504 KB Output is correct
132 Correct 22 ms 11260 KB Output is correct
133 Correct 21 ms 11032 KB Output is correct
134 Correct 23 ms 11088 KB Output is correct
135 Correct 12 ms 5200 KB Output is correct
136 Execution timed out 1562 ms 5308 KB Time limit exceeded
137 Halted 0 ms 0 KB -