답안 #951467

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
951467 2024-03-22T03:00:05 Z Nhoksocqt1 벽 칠하기 (APIO20_paint) C++17
40 / 100
76 ms 16596 KB
#include<bits/stdc++.h>
using namespace std;

#define inf 0x3f3f3f3f
#define sz(x) int((x).size())
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> ii;

template<class X, class Y>
	inline bool maximize(X &x, const Y &y) {return (x < y ? x = y, 1 : 0);}
template<class X, class Y>
	inline bool minimize(X &x, const Y &y) {return (x > y ? x = y, 1 : 0);}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int Random(int l, int r) {
    return uniform_int_distribution<int>(l, r)(rng);
}

const int MAXN = 100005;
const int MAXM = 50004;

vector<int> B[MAXM], C[MAXN];
int colNeed[MAXN], dp[MAXN], sum[MAXN], nArr, mArr, numCol;
bool dx[502][502], ok[MAXN];

int sub1(void) {
    for (int i = 1; i <= nArr; ++i) {
        if(sz(C[colNeed[i]]) == 0)
            return -1;

        dp[i] = C[colNeed[i]][0];
        sum[i] = sum[i - 1] + (i > 1 && (dp[i - 1] + 1) % mArr == dp[i]);
    }

    int res(0), maxi(1), lastok(-mArr);
    for (int i = 1; i <= nArr; ++i) {
        if(sum[i + mArr - 1] - sum[i] == mArr - 1 && (dp[i + mArr - 1] + 1) % mArr == dp[i])
            lastok = i;

        if(i == maxi) {
            if(lastok + mArr <= i)
                return -1;

            maxi = lastok + mArr;
            ++res;
        }
    }

    return res;
}

int sub3(void) {
    for (int j = 0; j < mArr; ++j) {
        for (int it = 0; it < sz(B[j]); ++it)
            dx[j][B[j][it]] = 1;
    }

    for (int i = 1; i + mArr - 1 <= nArr; ++i) {
        ok[i] = 0;
        for (int j = 0; j < mArr; ++j) {
            ok[i] = 1;
            for (int k = 0; k < mArr; ++k)
                ok[i] &= (dx[(j + k) % mArr][colNeed[i + k]]);

            if(ok[i])
                break;
        }

        //cout << ok[i] << " \n"[i + mArr - 1 == nArr];
    }

    dp[0] = 0;
    for (int i = 1; i <= nArr; ++i)
        dp[i] = 1e9+7;

    for (int i = 0; i < nArr; ++i) {
        for (int j = 0; i + 1 - j > 0 && j < mArr; ++j) {
            if(ok[i + 1 - j])
                dp[i + mArr - j] = min(dp[i + mArr - j], dp[i] + 1);
        }
    }

    return (dp[nArr] >= 1e9) ? -1 : dp[nArr];
}

int minimumInstructions(int _N, int _M, int _K, vector<int> _C, vector<int> _A, vector<vector<int>> _B) {
    nArr = _N, mArr = _M, numCol = _K;
    for (int i = 1; i <= nArr; ++i) {
        colNeed[i] = _C[i - 1];
        C[i].clear();
    }

    int maxf(0);
    for (int i = 0; i < mArr; ++i) {
        int szlike(_A[i]);

        B[i].clear();
        for (int j = 0; j < szlike; ++j) {
            B[i].push_back(_B[i][j]);
            C[_B[i][j]].push_back(i);
            maxf = max(maxf, sz(C[_B[i][j]]));
        }
    }

    if(maxf <= 1)
        return sub1();

    if(nArr <= 500)
        return sub3();

    return -1;
}

#ifdef Nhoksocqt1

int main(void) {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

    #define TASK "paint"
    if(fopen(TASK".inp", "r")) {
        freopen(TASK".inp", "r", stdin);
        freopen(TASK".out", "w", stdout);
    }

    vector<int> _A, _C;
    vector<vector<int>> _B;
    int _N, _M, _K;
    cin >> _N >> _M >> _K;

    _C.resize(_N);
    for (int i = 0; i < _N; ++i)
        cin >> _C[i];

    _A.resize(_M), _B.resize(_M);
    for (int i = 0; i < _M; ++i) {
        cin >> _A[i];
        _B[i].resize(_A[i]);
        for (int j = 0; j < _A[i]; ++j)
            cin >> _B[i][j];
    }

    int ans = minimumInstructions(_N, _M, _K, _C, _A, _B);
    cout << "ANSWER: " << ans << '\n';

    return 0;
}

#endif // Nhoksocqt1
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5208 KB Output is correct
2 Correct 1 ms 5208 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 4 ms 5212 KB Output is correct
5 Correct 1 ms 5212 KB Output is correct
6 Correct 1 ms 5212 KB Output is correct
7 Correct 1 ms 5212 KB Output is correct
8 Correct 1 ms 5464 KB Output is correct
9 Correct 2 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 6 ms 5212 KB Output is correct
13 Correct 2 ms 5212 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 5208 KB Output is correct
16 Correct 1 ms 5208 KB Output is correct
17 Correct 2 ms 5212 KB Output is correct
18 Correct 2 ms 5208 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5208 KB Output is correct
22 Correct 16 ms 9732 KB Output is correct
23 Correct 15 ms 9564 KB Output is correct
24 Correct 15 ms 9628 KB Output is correct
25 Correct 4 ms 5208 KB Output is correct
26 Correct 3 ms 5212 KB Output is correct
27 Correct 3 ms 5212 KB Output is correct
28 Correct 3 ms 5212 KB Output is correct
29 Correct 3 ms 5212 KB Output is correct
30 Correct 3 ms 5212 KB Output is correct
31 Correct 6 ms 6412 KB Output is correct
32 Correct 8 ms 6904 KB Output is correct
33 Correct 6 ms 6492 KB Output is correct
34 Correct 6 ms 6492 KB Output is correct
35 Correct 7 ms 6492 KB Output is correct
36 Correct 6 ms 6492 KB Output is correct
37 Correct 17 ms 10072 KB Output is correct
38 Correct 17 ms 10076 KB Output is correct
39 Correct 17 ms 10076 KB Output is correct
40 Correct 8 ms 5980 KB Output is correct
41 Correct 5 ms 5724 KB Output is correct
42 Correct 8 ms 5960 KB Output is correct
43 Correct 6 ms 5720 KB Output is correct
44 Correct 5 ms 5720 KB Output is correct
45 Correct 9 ms 5980 KB Output is correct
46 Correct 32 ms 15700 KB Output is correct
47 Correct 29 ms 10912 KB Output is correct
48 Correct 28 ms 14164 KB Output is correct
49 Correct 28 ms 14172 KB Output is correct
50 Correct 28 ms 13660 KB Output is correct
51 Correct 23 ms 11036 KB Output is correct
52 Correct 9 ms 5980 KB Output is correct
53 Correct 8 ms 5976 KB Output is correct
54 Correct 9 ms 5976 KB Output is correct
55 Correct 8 ms 5980 KB Output is correct
56 Correct 8 ms 5980 KB Output is correct
57 Correct 8 ms 5980 KB Output is correct
58 Correct 40 ms 16452 KB Output is correct
59 Correct 42 ms 16596 KB Output is correct
60 Correct 36 ms 16512 KB Output is correct
61 Correct 36 ms 16464 KB Output is correct
62 Correct 35 ms 16468 KB Output is correct
63 Correct 36 ms 16496 KB Output is correct
64 Correct 42 ms 15696 KB Output is correct
65 Correct 46 ms 15588 KB Output is correct
66 Correct 48 ms 15444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5208 KB Output is correct
2 Correct 1 ms 5208 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 4 ms 5212 KB Output is correct
5 Correct 1 ms 5212 KB Output is correct
6 Correct 1 ms 5212 KB Output is correct
7 Correct 1 ms 5212 KB Output is correct
8 Correct 1 ms 5464 KB Output is correct
9 Correct 2 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 6 ms 5212 KB Output is correct
13 Correct 2 ms 5212 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 5208 KB Output is correct
16 Correct 1 ms 5208 KB Output is correct
17 Correct 2 ms 5212 KB Output is correct
18 Correct 2 ms 5208 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5208 KB Output is correct
22 Correct 1 ms 5212 KB Output is correct
23 Correct 1 ms 5208 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 1 ms 5312 KB Output is correct
26 Correct 1 ms 5212 KB Output is correct
27 Correct 1 ms 5212 KB Output is correct
28 Correct 2 ms 5212 KB Output is correct
29 Correct 3 ms 5220 KB Output is correct
30 Correct 3 ms 5212 KB Output is correct
31 Correct 1 ms 5208 KB Output is correct
32 Correct 4 ms 5212 KB Output is correct
33 Correct 14 ms 5420 KB Output is correct
34 Correct 16 ms 5212 KB Output is correct
35 Correct 7 ms 5208 KB Output is correct
36 Correct 13 ms 5620 KB Output is correct
37 Correct 12 ms 5212 KB Output is correct
38 Correct 2 ms 5208 KB Output is correct
39 Correct 1 ms 5212 KB Output is correct
40 Correct 19 ms 5212 KB Output is correct
41 Correct 11 ms 5208 KB Output is correct
42 Correct 12 ms 5212 KB Output is correct
43 Correct 4 ms 5208 KB Output is correct
44 Correct 1 ms 5208 KB Output is correct
45 Correct 2 ms 5208 KB Output is correct
46 Correct 5 ms 5212 KB Output is correct
47 Correct 7 ms 5212 KB Output is correct
48 Correct 8 ms 5356 KB Output is correct
49 Correct 9 ms 5212 KB Output is correct
50 Correct 32 ms 5212 KB Output is correct
51 Correct 26 ms 5316 KB Output is correct
52 Correct 26 ms 5316 KB Output is correct
53 Correct 30 ms 5212 KB Output is correct
54 Correct 28 ms 5212 KB Output is correct
55 Correct 26 ms 5212 KB Output is correct
56 Correct 54 ms 5212 KB Output is correct
57 Correct 25 ms 5208 KB Output is correct
58 Correct 53 ms 5212 KB Output is correct
59 Correct 29 ms 5212 KB Output is correct
60 Correct 54 ms 5436 KB Output is correct
61 Correct 32 ms 5208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5212 KB Output is correct
2 Correct 1 ms 5208 KB Output is correct
3 Correct 2 ms 5208 KB Output is correct
4 Correct 1 ms 5208 KB Output is correct
5 Correct 1 ms 5212 KB Output is correct
6 Correct 4 ms 5212 KB Output is correct
7 Correct 1 ms 5212 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5464 KB Output is correct
11 Correct 2 ms 5212 KB Output is correct
12 Correct 1 ms 5212 KB Output is correct
13 Correct 1 ms 5212 KB Output is correct
14 Correct 6 ms 5212 KB Output is correct
15 Correct 2 ms 5212 KB Output is correct
16 Correct 1 ms 5208 KB Output is correct
17 Correct 1 ms 5208 KB Output is correct
18 Correct 1 ms 5208 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5208 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5212 KB Output is correct
23 Correct 2 ms 5208 KB Output is correct
24 Correct 16 ms 9732 KB Output is correct
25 Correct 15 ms 9564 KB Output is correct
26 Correct 15 ms 9628 KB Output is correct
27 Correct 1 ms 5212 KB Output is correct
28 Correct 1 ms 5312 KB Output is correct
29 Correct 1 ms 5212 KB Output is correct
30 Correct 1 ms 5212 KB Output is correct
31 Correct 2 ms 5212 KB Output is correct
32 Correct 3 ms 5220 KB Output is correct
33 Correct 3 ms 5212 KB Output is correct
34 Correct 1 ms 5208 KB Output is correct
35 Correct 4 ms 5212 KB Output is correct
36 Correct 14 ms 5420 KB Output is correct
37 Correct 16 ms 5212 KB Output is correct
38 Correct 7 ms 5208 KB Output is correct
39 Correct 13 ms 5620 KB Output is correct
40 Correct 12 ms 5212 KB Output is correct
41 Correct 2 ms 5208 KB Output is correct
42 Correct 1 ms 5212 KB Output is correct
43 Correct 19 ms 5212 KB Output is correct
44 Correct 11 ms 5208 KB Output is correct
45 Correct 12 ms 5212 KB Output is correct
46 Correct 4 ms 5208 KB Output is correct
47 Correct 1 ms 5208 KB Output is correct
48 Correct 2 ms 5208 KB Output is correct
49 Correct 5 ms 5212 KB Output is correct
50 Correct 7 ms 5212 KB Output is correct
51 Correct 8 ms 5356 KB Output is correct
52 Correct 9 ms 5212 KB Output is correct
53 Correct 32 ms 5212 KB Output is correct
54 Correct 26 ms 5316 KB Output is correct
55 Correct 26 ms 5316 KB Output is correct
56 Correct 30 ms 5212 KB Output is correct
57 Correct 28 ms 5212 KB Output is correct
58 Correct 26 ms 5212 KB Output is correct
59 Correct 54 ms 5212 KB Output is correct
60 Correct 25 ms 5208 KB Output is correct
61 Correct 53 ms 5212 KB Output is correct
62 Correct 29 ms 5212 KB Output is correct
63 Correct 54 ms 5436 KB Output is correct
64 Correct 32 ms 5208 KB Output is correct
65 Correct 2 ms 5208 KB Output is correct
66 Correct 2 ms 5212 KB Output is correct
67 Correct 2 ms 5212 KB Output is correct
68 Correct 2 ms 5212 KB Output is correct
69 Correct 2 ms 5308 KB Output is correct
70 Correct 12 ms 5468 KB Output is correct
71 Correct 8 ms 5972 KB Output is correct
72 Correct 3 ms 5464 KB Output is correct
73 Correct 2 ms 5464 KB Output is correct
74 Correct 5 ms 5468 KB Output is correct
75 Correct 9 ms 5628 KB Output is correct
76 Correct 27 ms 9432 KB Output is correct
77 Correct 15 ms 9688 KB Output is correct
78 Correct 21 ms 10332 KB Output is correct
79 Correct 2 ms 5212 KB Output is correct
80 Correct 2 ms 5212 KB Output is correct
81 Correct 2 ms 5388 KB Output is correct
82 Correct 2 ms 5212 KB Output is correct
83 Correct 2 ms 5208 KB Output is correct
84 Correct 10 ms 5720 KB Output is correct
85 Correct 15 ms 5796 KB Output is correct
86 Correct 12 ms 5720 KB Output is correct
87 Correct 12 ms 5800 KB Output is correct
88 Correct 10 ms 5724 KB Output is correct
89 Correct 12 ms 5720 KB Output is correct
90 Correct 75 ms 10832 KB Output is correct
91 Correct 76 ms 10576 KB Output is correct
92 Correct 74 ms 10836 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5212 KB Output is correct
2 Correct 1 ms 5208 KB Output is correct
3 Correct 2 ms 5208 KB Output is correct
4 Correct 1 ms 5208 KB Output is correct
5 Correct 1 ms 5212 KB Output is correct
6 Correct 4 ms 5212 KB Output is correct
7 Correct 1 ms 5212 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5464 KB Output is correct
11 Correct 2 ms 5212 KB Output is correct
12 Correct 1 ms 5212 KB Output is correct
13 Correct 1 ms 5212 KB Output is correct
14 Correct 6 ms 5212 KB Output is correct
15 Correct 2 ms 5212 KB Output is correct
16 Correct 1 ms 5208 KB Output is correct
17 Correct 1 ms 5208 KB Output is correct
18 Correct 1 ms 5208 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5208 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5212 KB Output is correct
23 Correct 2 ms 5208 KB Output is correct
24 Correct 16 ms 9732 KB Output is correct
25 Correct 15 ms 9564 KB Output is correct
26 Correct 15 ms 9628 KB Output is correct
27 Correct 4 ms 5208 KB Output is correct
28 Correct 3 ms 5212 KB Output is correct
29 Correct 3 ms 5212 KB Output is correct
30 Correct 3 ms 5212 KB Output is correct
31 Correct 3 ms 5212 KB Output is correct
32 Correct 3 ms 5212 KB Output is correct
33 Correct 6 ms 6412 KB Output is correct
34 Correct 8 ms 6904 KB Output is correct
35 Correct 6 ms 6492 KB Output is correct
36 Correct 6 ms 6492 KB Output is correct
37 Correct 7 ms 6492 KB Output is correct
38 Correct 6 ms 6492 KB Output is correct
39 Correct 17 ms 10072 KB Output is correct
40 Correct 17 ms 10076 KB Output is correct
41 Correct 17 ms 10076 KB Output is correct
42 Correct 1 ms 5212 KB Output is correct
43 Correct 1 ms 5312 KB Output is correct
44 Correct 1 ms 5212 KB Output is correct
45 Correct 1 ms 5212 KB Output is correct
46 Correct 2 ms 5212 KB Output is correct
47 Correct 3 ms 5220 KB Output is correct
48 Correct 3 ms 5212 KB Output is correct
49 Correct 1 ms 5208 KB Output is correct
50 Correct 4 ms 5212 KB Output is correct
51 Correct 14 ms 5420 KB Output is correct
52 Correct 16 ms 5212 KB Output is correct
53 Correct 7 ms 5208 KB Output is correct
54 Correct 13 ms 5620 KB Output is correct
55 Correct 12 ms 5212 KB Output is correct
56 Correct 2 ms 5208 KB Output is correct
57 Correct 1 ms 5212 KB Output is correct
58 Correct 19 ms 5212 KB Output is correct
59 Correct 11 ms 5208 KB Output is correct
60 Correct 12 ms 5212 KB Output is correct
61 Correct 4 ms 5208 KB Output is correct
62 Correct 1 ms 5208 KB Output is correct
63 Correct 2 ms 5208 KB Output is correct
64 Correct 5 ms 5212 KB Output is correct
65 Correct 7 ms 5212 KB Output is correct
66 Correct 8 ms 5356 KB Output is correct
67 Correct 9 ms 5212 KB Output is correct
68 Correct 32 ms 5212 KB Output is correct
69 Correct 26 ms 5316 KB Output is correct
70 Correct 26 ms 5316 KB Output is correct
71 Correct 30 ms 5212 KB Output is correct
72 Correct 28 ms 5212 KB Output is correct
73 Correct 26 ms 5212 KB Output is correct
74 Correct 54 ms 5212 KB Output is correct
75 Correct 25 ms 5208 KB Output is correct
76 Correct 53 ms 5212 KB Output is correct
77 Correct 29 ms 5212 KB Output is correct
78 Correct 54 ms 5436 KB Output is correct
79 Correct 32 ms 5208 KB Output is correct
80 Correct 2 ms 5208 KB Output is correct
81 Correct 2 ms 5212 KB Output is correct
82 Correct 2 ms 5212 KB Output is correct
83 Correct 2 ms 5212 KB Output is correct
84 Correct 2 ms 5308 KB Output is correct
85 Correct 12 ms 5468 KB Output is correct
86 Correct 8 ms 5972 KB Output is correct
87 Correct 3 ms 5464 KB Output is correct
88 Correct 2 ms 5464 KB Output is correct
89 Correct 5 ms 5468 KB Output is correct
90 Correct 9 ms 5628 KB Output is correct
91 Correct 27 ms 9432 KB Output is correct
92 Correct 15 ms 9688 KB Output is correct
93 Correct 21 ms 10332 KB Output is correct
94 Correct 2 ms 5212 KB Output is correct
95 Correct 2 ms 5212 KB Output is correct
96 Correct 2 ms 5388 KB Output is correct
97 Correct 2 ms 5212 KB Output is correct
98 Correct 2 ms 5208 KB Output is correct
99 Correct 10 ms 5720 KB Output is correct
100 Correct 15 ms 5796 KB Output is correct
101 Correct 12 ms 5720 KB Output is correct
102 Correct 12 ms 5800 KB Output is correct
103 Correct 10 ms 5724 KB Output is correct
104 Correct 12 ms 5720 KB Output is correct
105 Correct 75 ms 10832 KB Output is correct
106 Correct 76 ms 10576 KB Output is correct
107 Correct 74 ms 10836 KB Output is correct
108 Incorrect 3 ms 5716 KB Output isn't correct
109 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5212 KB Output is correct
2 Correct 1 ms 5208 KB Output is correct
3 Correct 2 ms 5208 KB Output is correct
4 Correct 1 ms 5208 KB Output is correct
5 Correct 1 ms 5212 KB Output is correct
6 Correct 4 ms 5212 KB Output is correct
7 Correct 1 ms 5212 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5464 KB Output is correct
11 Correct 2 ms 5212 KB Output is correct
12 Correct 1 ms 5212 KB Output is correct
13 Correct 1 ms 5212 KB Output is correct
14 Correct 6 ms 5212 KB Output is correct
15 Correct 2 ms 5212 KB Output is correct
16 Correct 1 ms 5208 KB Output is correct
17 Correct 1 ms 5208 KB Output is correct
18 Correct 1 ms 5208 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5208 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5212 KB Output is correct
23 Correct 2 ms 5208 KB Output is correct
24 Correct 16 ms 9732 KB Output is correct
25 Correct 15 ms 9564 KB Output is correct
26 Correct 15 ms 9628 KB Output is correct
27 Correct 4 ms 5208 KB Output is correct
28 Correct 3 ms 5212 KB Output is correct
29 Correct 3 ms 5212 KB Output is correct
30 Correct 3 ms 5212 KB Output is correct
31 Correct 3 ms 5212 KB Output is correct
32 Correct 3 ms 5212 KB Output is correct
33 Correct 6 ms 6412 KB Output is correct
34 Correct 8 ms 6904 KB Output is correct
35 Correct 6 ms 6492 KB Output is correct
36 Correct 6 ms 6492 KB Output is correct
37 Correct 7 ms 6492 KB Output is correct
38 Correct 6 ms 6492 KB Output is correct
39 Correct 17 ms 10072 KB Output is correct
40 Correct 17 ms 10076 KB Output is correct
41 Correct 17 ms 10076 KB Output is correct
42 Correct 8 ms 5980 KB Output is correct
43 Correct 5 ms 5724 KB Output is correct
44 Correct 8 ms 5960 KB Output is correct
45 Correct 6 ms 5720 KB Output is correct
46 Correct 5 ms 5720 KB Output is correct
47 Correct 9 ms 5980 KB Output is correct
48 Correct 32 ms 15700 KB Output is correct
49 Correct 29 ms 10912 KB Output is correct
50 Correct 28 ms 14164 KB Output is correct
51 Correct 28 ms 14172 KB Output is correct
52 Correct 28 ms 13660 KB Output is correct
53 Correct 23 ms 11036 KB Output is correct
54 Correct 9 ms 5980 KB Output is correct
55 Correct 8 ms 5976 KB Output is correct
56 Correct 9 ms 5976 KB Output is correct
57 Correct 8 ms 5980 KB Output is correct
58 Correct 8 ms 5980 KB Output is correct
59 Correct 8 ms 5980 KB Output is correct
60 Correct 40 ms 16452 KB Output is correct
61 Correct 42 ms 16596 KB Output is correct
62 Correct 36 ms 16512 KB Output is correct
63 Correct 36 ms 16464 KB Output is correct
64 Correct 35 ms 16468 KB Output is correct
65 Correct 36 ms 16496 KB Output is correct
66 Correct 42 ms 15696 KB Output is correct
67 Correct 46 ms 15588 KB Output is correct
68 Correct 48 ms 15444 KB Output is correct
69 Correct 1 ms 5212 KB Output is correct
70 Correct 1 ms 5312 KB Output is correct
71 Correct 1 ms 5212 KB Output is correct
72 Correct 1 ms 5212 KB Output is correct
73 Correct 2 ms 5212 KB Output is correct
74 Correct 3 ms 5220 KB Output is correct
75 Correct 3 ms 5212 KB Output is correct
76 Correct 1 ms 5208 KB Output is correct
77 Correct 4 ms 5212 KB Output is correct
78 Correct 14 ms 5420 KB Output is correct
79 Correct 16 ms 5212 KB Output is correct
80 Correct 7 ms 5208 KB Output is correct
81 Correct 13 ms 5620 KB Output is correct
82 Correct 12 ms 5212 KB Output is correct
83 Correct 2 ms 5208 KB Output is correct
84 Correct 1 ms 5212 KB Output is correct
85 Correct 19 ms 5212 KB Output is correct
86 Correct 11 ms 5208 KB Output is correct
87 Correct 12 ms 5212 KB Output is correct
88 Correct 4 ms 5208 KB Output is correct
89 Correct 1 ms 5208 KB Output is correct
90 Correct 2 ms 5208 KB Output is correct
91 Correct 5 ms 5212 KB Output is correct
92 Correct 7 ms 5212 KB Output is correct
93 Correct 8 ms 5356 KB Output is correct
94 Correct 9 ms 5212 KB Output is correct
95 Correct 32 ms 5212 KB Output is correct
96 Correct 26 ms 5316 KB Output is correct
97 Correct 26 ms 5316 KB Output is correct
98 Correct 30 ms 5212 KB Output is correct
99 Correct 28 ms 5212 KB Output is correct
100 Correct 26 ms 5212 KB Output is correct
101 Correct 54 ms 5212 KB Output is correct
102 Correct 25 ms 5208 KB Output is correct
103 Correct 53 ms 5212 KB Output is correct
104 Correct 29 ms 5212 KB Output is correct
105 Correct 54 ms 5436 KB Output is correct
106 Correct 32 ms 5208 KB Output is correct
107 Correct 2 ms 5208 KB Output is correct
108 Correct 2 ms 5212 KB Output is correct
109 Correct 2 ms 5212 KB Output is correct
110 Correct 2 ms 5212 KB Output is correct
111 Correct 2 ms 5308 KB Output is correct
112 Correct 12 ms 5468 KB Output is correct
113 Correct 8 ms 5972 KB Output is correct
114 Correct 3 ms 5464 KB Output is correct
115 Correct 2 ms 5464 KB Output is correct
116 Correct 5 ms 5468 KB Output is correct
117 Correct 9 ms 5628 KB Output is correct
118 Correct 27 ms 9432 KB Output is correct
119 Correct 15 ms 9688 KB Output is correct
120 Correct 21 ms 10332 KB Output is correct
121 Correct 2 ms 5212 KB Output is correct
122 Correct 2 ms 5212 KB Output is correct
123 Correct 2 ms 5388 KB Output is correct
124 Correct 2 ms 5212 KB Output is correct
125 Correct 2 ms 5208 KB Output is correct
126 Correct 10 ms 5720 KB Output is correct
127 Correct 15 ms 5796 KB Output is correct
128 Correct 12 ms 5720 KB Output is correct
129 Correct 12 ms 5800 KB Output is correct
130 Correct 10 ms 5724 KB Output is correct
131 Correct 12 ms 5720 KB Output is correct
132 Correct 75 ms 10832 KB Output is correct
133 Correct 76 ms 10576 KB Output is correct
134 Correct 74 ms 10836 KB Output is correct
135 Incorrect 3 ms 5716 KB Output isn't correct
136 Halted 0 ms 0 KB -