Submission #984428

# Submission time Handle Problem Language Result Execution time Memory
984428 2024-05-16T16:10:07 Z maomao90 Tricolor Lights (JOI24_tricolor) C++17
100 / 100
84 ms 4376 KB
#include <bits/stdc++.h>
#include "Anna.h"

using namespace std;

namespace {
    const string rgb = "RGB";
    const vector<string> illegal[4] = {
        {},
        {"010", "101"},
        {"010", "101", "000"},
        {"010", "101", "020", "202"}
    };
    vector<int> debrujin(vector<string> illegal) {
        vector<int> adj[9];
        for (int a = 0; a < 3; a++) {
            for (int b = 0; b < 3; b++) {
                for (int c = 0; c < 3; c++) {
                    if (a != 0 && b != 0 && c != 0) {
                        continue;
                    }
                    bool bad = 0;
                    for (string s : illegal) {
                        if (s[0] - '0' == a && s[1] - '0' == b && s[2] - '0' == c) {
                            bad = 1;
                            break;
                        }
                    }
                    if (bad) {
                        continue;
                    }
                    adj[a * 3 + b].push_back(b * 3 + c);
                }
            }
        }
        int ptr[9];
        memset(ptr, 0, sizeof ptr);
        vector<int> stk;
        stk.push_back(0);
        vector<int> res;
        while (!stk.empty()) {
            int u = stk.back();
            if (ptr[u] == adj[u].size()) {
                stk.pop_back();
                res.push_back(u % 3);
            } else {
                stk.push_back(adj[u][ptr[u]++]);
            }
        }
        res.pop_back();
        return res;
    }
    int n;
    string s;
    vector<int> key[4];
}

pair<string, int> anna(int N, string S) {
    n = N; s = S;
    for (int i = 0; i < 4; i++) {
        key[i] = debrujin(illegal[i]);
    }
    string res(n, '?');
    for (int i = 0; i < n; i++) {
        int rid = i % 9;
        if (rid == 8 || i + 1 == n) {
            for (char c : rgb) {
                if (c != s[i] && c != res[i - 1]) {
                    res[i] = c;
                    break;
                }
            }
        } else {
            for (int l = 0; l < 3; l++) {
                int r = (l + 
                        key[rid / 2][(i / 9) % key[rid / 2].size()]) % 3;
                if (s[i] != rgb[l] && s[i + 1] != rgb[r]) {
                    res[i] = rgb[l];
                    res[i + 1] = rgb[r];
                    break;
                }
            }
            i++;
        }
    }
    return {res, min(28, n)};
}
#include <bits/stdc++.h>
#include "Bruno.h"

using namespace std;

namespace {
    int extended_gcd(int a, int b, int &x, int &y) {
        pair<int, int> va = {1, 0}, vb = {0, 1};
        while (b) {
            int k = a / b;
            a -= k * b;
            va.first -= k * vb.first;
            va.second -= k * vb.second;
            swap(a, b);
            swap(va, vb);
        }
        tie(x, y) = va;
        return a;
    }
    int inv(int x, int p) {
        int res, _; 
        extended_gcd(x, p, res, _);
        return (res % p + p) % p;
    }
    int crt(vector<int> a, vector<int> m) {
        int n = a.size();
        int mod = 1;
        for (int i = 0; i < n; i++) {
            mod *= m[i];
        }
        int res = 0;
        for (int i = 0; i < n; i++) {
            int y = 1;
            for (int j = 0; j < n; j++) {
                if (i != j) {
                    y *= m[j];
                }
            }
            res += a[i] * y * inv(y, m[i]);
        }
        return res % mod;
    }
    const string rgb = "RGB";
    const vector<string> illegal[4] = {
        {},
        {"010", "101"},
        {"010", "101", "000"},
        {"010", "101", "020", "202"}
    };
    int irgb[300];
    vector<int> debrujin(vector<string> illegal) {
        vector<int> adj[9];
        for (int a = 0; a < 3; a++) {
            for (int b = 0; b < 3; b++) {
                for (int c = 0; c < 3; c++) {
                    if (a != 0 && b != 0 && c != 0) {
                        continue;
                    }
                    bool bad = 0;
                    for (string s : illegal) {
                        if (s[0] - '0' == a && s[1] - '0' == b && s[2] - '0' == c) {
                            bad = 1;
                            break;
                        }
                    }
                    if (bad) {
                        continue;
                    }
                    adj[a * 3 + b].push_back(b * 3 + c);
                }
            }
        }
        int ptr[9];
        memset(ptr, 0, sizeof ptr);
        vector<int> stk;
        stk.push_back(0);
        vector<int> res;
        while (!stk.empty()) {
            int u = stk.back();
            if (ptr[u] == adj[u].size()) {
                stk.pop_back();
                res.push_back(u % 3);
            } else {
                stk.push_back(adj[u][ptr[u]++]);
            }
        }
        res.pop_back();
        return res;
    }
    int n, l;
    vector<int> key[4];
}

void init(int N, int l) {
    n = N;
    ::l = l;
    for (int i = 0; i < 3; i++) {
        irgb[rgb[i]] = i;
    }
    for (int i = 0; i < 4; i++) {
        key[i] = debrujin(illegal[i]);
    }
}

int bruno(string u) {
    if (n == l) {
        return 1;
    }
    for (int o = 0; o < 9; o++) {
        bool bad = 0;
        vector<int> label[4];
        for (int i = 0; i < l; i++) {
            int rid = (i + o) % 9;
            if (rid % 2 == 1) {
                continue;
            }
            if (rid == 8) {
                if (i && u[i - 1] == u[i]) {
                    bad = 1;
                    break;
                }
                continue;
            }
            if (i + 1 == l) {
                break;
            }
            label[rid / 2].push_back((irgb[u[i + 1]] - irgb[u[i]] + 3) % 3);
            i++;
        }
        if (bad) {
            continue;
        }
        for (int t = 0; t < 4; t++) {
            bool has0 = 0;
            for (int x : label[t]) {
                if (x == 0) {
                    has0 = 1;
                    break;
                }
            }
            if (!has0) {
                bad = 1;
                break;
            }
        }
        if (bad) {
            continue;
        }
        vector<int> a(4), m(4);
        for (int t = 0; t < 4; t++) {
            m[t] = key[t].size();
            for (int i = 0; i < m[t]; i++) {
                bool bad = 0;
                for (int j = 0; j < 3; j++) {
                    if (key[t][(i + j) % m[t]] != label[t][j]) {
                        bad = 1;
                        break;
                    }
                }
                if (!bad) {
                    a[t] = i;
                    break;
                }
            }
            if (t * 2 < o) {
                a[t] = (a[t] - 1 + m[t]) % m[t];
            }
        }
        int id = crt(a, m);
        return id * 9 + o + 1;
    }
    assert(0);
}

Compilation message

Anna.cpp: In function 'std::vector<int> {anonymous}::debrujin(std::vector<std::__cxx11::basic_string<char> >)':
Anna.cpp:43:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   43 |             if (ptr[u] == adj[u].size()) {
      |                 ~~~~~~~^~~~~~~~~~~~~~~~

Bruno.cpp: In function 'std::vector<int> {anonymous}::debrujin(std::vector<std::__cxx11::basic_string<char> >)':
Bruno.cpp:80:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |             if (ptr[u] == adj[u].size()) {
      |                 ~~~~~~~^~~~~~~~~~~~~~~~
Bruno.cpp: In function 'void init(int, int)':
Bruno.cpp:98:20: warning: array subscript has type 'char' [-Wchar-subscripts]
   98 |         irgb[rgb[i]] = i;
      |                    ^
Bruno.cpp: In function 'int bruno(std::string)':
Bruno.cpp:127:52: warning: array subscript has type 'char' [-Wchar-subscripts]
  127 |             label[rid / 2].push_back((irgb[u[i + 1]] - irgb[u[i]] + 3) % 3);
      |                                                    ^
Bruno.cpp:127:65: warning: array subscript has type 'char' [-Wchar-subscripts]
  127 |             label[rid / 2].push_back((irgb[u[i + 1]] - irgb[u[i]] + 3) % 3);
      |                                                                 ^
# Verdict Execution time Memory Grader output
1 Correct 41 ms 1312 KB Output is correct
2 Correct 25 ms 1384 KB Output is correct
3 Correct 35 ms 1312 KB Output is correct
4 Correct 28 ms 1328 KB Output is correct
5 Correct 35 ms 1340 KB Output is correct
6 Correct 45 ms 1216 KB Output is correct
7 Correct 40 ms 1336 KB Output is correct
8 Correct 35 ms 1340 KB Output is correct
9 Correct 38 ms 1332 KB Output is correct
10 Correct 51 ms 1384 KB Output is correct
11 Correct 24 ms 1288 KB Output is correct
12 Correct 25 ms 1316 KB Output is correct
13 Correct 25 ms 1324 KB Output is correct
14 Correct 32 ms 1352 KB Output is correct
15 Correct 42 ms 1320 KB Output is correct
16 Correct 50 ms 1304 KB Output is correct
17 Correct 33 ms 1328 KB Output is correct
18 Correct 32 ms 1348 KB Output is correct
19 Correct 36 ms 1388 KB Output is correct
20 Correct 32 ms 1288 KB Output is correct
21 Correct 37 ms 1328 KB Output is correct
22 Correct 33 ms 1316 KB Output is correct
23 Correct 37 ms 1316 KB Output is correct
24 Correct 39 ms 1328 KB Output is correct
25 Correct 38 ms 1340 KB Output is correct
26 Correct 36 ms 1324 KB Output is correct
27 Correct 35 ms 1340 KB Output is correct
28 Correct 49 ms 1320 KB Output is correct
29 Correct 37 ms 1600 KB Output is correct
30 Correct 37 ms 1328 KB Output is correct
31 Correct 46 ms 1312 KB Output is correct
32 Correct 64 ms 1324 KB Output is correct
33 Correct 43 ms 1328 KB Output is correct
34 Correct 27 ms 1320 KB Output is correct
35 Correct 28 ms 1356 KB Output is correct
36 Correct 63 ms 1316 KB Output is correct
37 Correct 40 ms 1392 KB Output is correct
38 Correct 39 ms 1388 KB Output is correct
39 Correct 38 ms 1340 KB Output is correct
40 Correct 41 ms 1336 KB Output is correct
41 Correct 44 ms 1356 KB Output is correct
42 Correct 63 ms 1288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 41 ms 1312 KB Output is correct
2 Correct 25 ms 1384 KB Output is correct
3 Correct 35 ms 1312 KB Output is correct
4 Correct 28 ms 1328 KB Output is correct
5 Correct 35 ms 1340 KB Output is correct
6 Correct 45 ms 1216 KB Output is correct
7 Correct 40 ms 1336 KB Output is correct
8 Correct 35 ms 1340 KB Output is correct
9 Correct 38 ms 1332 KB Output is correct
10 Correct 51 ms 1384 KB Output is correct
11 Correct 24 ms 1288 KB Output is correct
12 Correct 25 ms 1316 KB Output is correct
13 Correct 25 ms 1324 KB Output is correct
14 Correct 32 ms 1352 KB Output is correct
15 Correct 42 ms 1320 KB Output is correct
16 Correct 50 ms 1304 KB Output is correct
17 Correct 33 ms 1328 KB Output is correct
18 Correct 32 ms 1348 KB Output is correct
19 Correct 36 ms 1388 KB Output is correct
20 Correct 32 ms 1288 KB Output is correct
21 Correct 37 ms 1328 KB Output is correct
22 Correct 33 ms 1316 KB Output is correct
23 Correct 37 ms 1316 KB Output is correct
24 Correct 39 ms 1328 KB Output is correct
25 Correct 38 ms 1340 KB Output is correct
26 Correct 36 ms 1324 KB Output is correct
27 Correct 35 ms 1340 KB Output is correct
28 Correct 49 ms 1320 KB Output is correct
29 Correct 37 ms 1600 KB Output is correct
30 Correct 37 ms 1328 KB Output is correct
31 Correct 46 ms 1312 KB Output is correct
32 Correct 64 ms 1324 KB Output is correct
33 Correct 43 ms 1328 KB Output is correct
34 Correct 27 ms 1320 KB Output is correct
35 Correct 28 ms 1356 KB Output is correct
36 Correct 63 ms 1316 KB Output is correct
37 Correct 40 ms 1392 KB Output is correct
38 Correct 39 ms 1388 KB Output is correct
39 Correct 38 ms 1340 KB Output is correct
40 Correct 41 ms 1336 KB Output is correct
41 Correct 44 ms 1356 KB Output is correct
42 Correct 63 ms 1288 KB Output is correct
43 Correct 36 ms 1288 KB Output is correct
44 Correct 58 ms 1324 KB Output is correct
45 Correct 36 ms 1340 KB Output is correct
46 Correct 37 ms 1356 KB Output is correct
47 Correct 37 ms 1360 KB Output is correct
48 Correct 65 ms 1316 KB Output is correct
49 Correct 60 ms 1320 KB Output is correct
50 Correct 36 ms 1288 KB Output is correct
51 Correct 39 ms 1392 KB Output is correct
52 Correct 42 ms 1336 KB Output is correct
53 Correct 36 ms 1292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 41 ms 1312 KB Output is correct
2 Correct 25 ms 1384 KB Output is correct
3 Correct 35 ms 1312 KB Output is correct
4 Correct 28 ms 1328 KB Output is correct
5 Correct 35 ms 1340 KB Output is correct
6 Correct 45 ms 1216 KB Output is correct
7 Correct 40 ms 1336 KB Output is correct
8 Correct 35 ms 1340 KB Output is correct
9 Correct 38 ms 1332 KB Output is correct
10 Correct 51 ms 1384 KB Output is correct
11 Correct 24 ms 1288 KB Output is correct
12 Correct 25 ms 1316 KB Output is correct
13 Correct 25 ms 1324 KB Output is correct
14 Correct 32 ms 1352 KB Output is correct
15 Correct 42 ms 1320 KB Output is correct
16 Correct 50 ms 1304 KB Output is correct
17 Correct 33 ms 1328 KB Output is correct
18 Correct 32 ms 1348 KB Output is correct
19 Correct 36 ms 1388 KB Output is correct
20 Correct 32 ms 1288 KB Output is correct
21 Correct 37 ms 1328 KB Output is correct
22 Correct 33 ms 1316 KB Output is correct
23 Correct 37 ms 1316 KB Output is correct
24 Correct 39 ms 1328 KB Output is correct
25 Correct 38 ms 1340 KB Output is correct
26 Correct 36 ms 1324 KB Output is correct
27 Correct 35 ms 1340 KB Output is correct
28 Correct 49 ms 1320 KB Output is correct
29 Correct 37 ms 1600 KB Output is correct
30 Correct 37 ms 1328 KB Output is correct
31 Correct 46 ms 1312 KB Output is correct
32 Correct 64 ms 1324 KB Output is correct
33 Correct 43 ms 1328 KB Output is correct
34 Correct 27 ms 1320 KB Output is correct
35 Correct 28 ms 1356 KB Output is correct
36 Correct 63 ms 1316 KB Output is correct
37 Correct 40 ms 1392 KB Output is correct
38 Correct 39 ms 1388 KB Output is correct
39 Correct 38 ms 1340 KB Output is correct
40 Correct 41 ms 1336 KB Output is correct
41 Correct 44 ms 1356 KB Output is correct
42 Correct 63 ms 1288 KB Output is correct
43 Correct 36 ms 1288 KB Output is correct
44 Correct 58 ms 1324 KB Output is correct
45 Correct 36 ms 1340 KB Output is correct
46 Correct 37 ms 1356 KB Output is correct
47 Correct 37 ms 1360 KB Output is correct
48 Correct 65 ms 1316 KB Output is correct
49 Correct 60 ms 1320 KB Output is correct
50 Correct 36 ms 1288 KB Output is correct
51 Correct 39 ms 1392 KB Output is correct
52 Correct 42 ms 1336 KB Output is correct
53 Correct 36 ms 1292 KB Output is correct
54 Correct 53 ms 1320 KB Output is correct
55 Correct 37 ms 1324 KB Output is correct
56 Correct 55 ms 1320 KB Output is correct
57 Correct 37 ms 1340 KB Output is correct
58 Correct 38 ms 1320 KB Output is correct
59 Correct 53 ms 1356 KB Output is correct
60 Correct 63 ms 1348 KB Output is correct
61 Correct 66 ms 1288 KB Output is correct
62 Correct 38 ms 1288 KB Output is correct
63 Correct 55 ms 1332 KB Output is correct
64 Correct 42 ms 1324 KB Output is correct
65 Correct 44 ms 1328 KB Output is correct
66 Correct 56 ms 1328 KB Output is correct
67 Correct 47 ms 1324 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 41 ms 1312 KB Output is correct
2 Correct 25 ms 1384 KB Output is correct
3 Correct 35 ms 1312 KB Output is correct
4 Correct 28 ms 1328 KB Output is correct
5 Correct 35 ms 1340 KB Output is correct
6 Correct 45 ms 1216 KB Output is correct
7 Correct 40 ms 1336 KB Output is correct
8 Correct 35 ms 1340 KB Output is correct
9 Correct 38 ms 1332 KB Output is correct
10 Correct 51 ms 1384 KB Output is correct
11 Correct 24 ms 1288 KB Output is correct
12 Correct 25 ms 1316 KB Output is correct
13 Correct 25 ms 1324 KB Output is correct
14 Correct 32 ms 1352 KB Output is correct
15 Correct 42 ms 1320 KB Output is correct
16 Correct 50 ms 1304 KB Output is correct
17 Correct 33 ms 1328 KB Output is correct
18 Correct 32 ms 1348 KB Output is correct
19 Correct 36 ms 1388 KB Output is correct
20 Correct 32 ms 1288 KB Output is correct
21 Correct 37 ms 1328 KB Output is correct
22 Correct 33 ms 1316 KB Output is correct
23 Correct 37 ms 1316 KB Output is correct
24 Correct 39 ms 1328 KB Output is correct
25 Correct 38 ms 1340 KB Output is correct
26 Correct 36 ms 1324 KB Output is correct
27 Correct 35 ms 1340 KB Output is correct
28 Correct 49 ms 1320 KB Output is correct
29 Correct 37 ms 1600 KB Output is correct
30 Correct 37 ms 1328 KB Output is correct
31 Correct 46 ms 1312 KB Output is correct
32 Correct 64 ms 1324 KB Output is correct
33 Correct 43 ms 1328 KB Output is correct
34 Correct 27 ms 1320 KB Output is correct
35 Correct 28 ms 1356 KB Output is correct
36 Correct 63 ms 1316 KB Output is correct
37 Correct 40 ms 1392 KB Output is correct
38 Correct 39 ms 1388 KB Output is correct
39 Correct 38 ms 1340 KB Output is correct
40 Correct 41 ms 1336 KB Output is correct
41 Correct 44 ms 1356 KB Output is correct
42 Correct 63 ms 1288 KB Output is correct
43 Correct 36 ms 1288 KB Output is correct
44 Correct 58 ms 1324 KB Output is correct
45 Correct 36 ms 1340 KB Output is correct
46 Correct 37 ms 1356 KB Output is correct
47 Correct 37 ms 1360 KB Output is correct
48 Correct 65 ms 1316 KB Output is correct
49 Correct 60 ms 1320 KB Output is correct
50 Correct 36 ms 1288 KB Output is correct
51 Correct 39 ms 1392 KB Output is correct
52 Correct 42 ms 1336 KB Output is correct
53 Correct 36 ms 1292 KB Output is correct
54 Correct 53 ms 1320 KB Output is correct
55 Correct 37 ms 1324 KB Output is correct
56 Correct 55 ms 1320 KB Output is correct
57 Correct 37 ms 1340 KB Output is correct
58 Correct 38 ms 1320 KB Output is correct
59 Correct 53 ms 1356 KB Output is correct
60 Correct 63 ms 1348 KB Output is correct
61 Correct 66 ms 1288 KB Output is correct
62 Correct 38 ms 1288 KB Output is correct
63 Correct 55 ms 1332 KB Output is correct
64 Correct 42 ms 1324 KB Output is correct
65 Correct 44 ms 1328 KB Output is correct
66 Correct 56 ms 1328 KB Output is correct
67 Correct 47 ms 1324 KB Output is correct
68 Correct 66 ms 1328 KB Output is correct
69 Correct 40 ms 1264 KB Output is correct
70 Correct 41 ms 1208 KB Output is correct
71 Correct 41 ms 1336 KB Output is correct
72 Correct 51 ms 1312 KB Output is correct
73 Correct 57 ms 1348 KB Output is correct
74 Correct 63 ms 1336 KB Output is correct
75 Correct 38 ms 1344 KB Output is correct
76 Correct 39 ms 1344 KB Output is correct
77 Correct 58 ms 1208 KB Output is correct
78 Correct 40 ms 1376 KB Output is correct
79 Correct 40 ms 1336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 1320 KB Output is correct
2 Correct 26 ms 1356 KB Output is correct
3 Correct 35 ms 1336 KB Output is correct
4 Correct 25 ms 1400 KB Output is correct
5 Correct 34 ms 1360 KB Output is correct
6 Correct 34 ms 1340 KB Output is correct
7 Correct 57 ms 1292 KB Output is correct
8 Correct 36 ms 1292 KB Output is correct
9 Correct 61 ms 1328 KB Output is correct
10 Correct 63 ms 1324 KB Output is correct
11 Correct 62 ms 1396 KB Output is correct
12 Correct 50 ms 1356 KB Output is correct
13 Correct 44 ms 1348 KB Output is correct
14 Correct 55 ms 1360 KB Output is correct
15 Correct 65 ms 4012 KB Output is correct
16 Correct 59 ms 4012 KB Output is correct
17 Correct 81 ms 4012 KB Output is correct
18 Correct 41 ms 1296 KB Output is correct
19 Correct 24 ms 1332 KB Output is correct
20 Correct 29 ms 1344 KB Output is correct
21 Correct 27 ms 1336 KB Output is correct
22 Correct 25 ms 1304 KB Output is correct
23 Correct 30 ms 1328 KB Output is correct
24 Correct 32 ms 1340 KB Output is correct
25 Correct 32 ms 1364 KB Output is correct
26 Correct 57 ms 1356 KB Output is correct
27 Correct 38 ms 1352 KB Output is correct
28 Correct 36 ms 1308 KB Output is correct
29 Correct 37 ms 1204 KB Output is correct
30 Correct 63 ms 1336 KB Output is correct
31 Correct 59 ms 1312 KB Output is correct
32 Correct 33 ms 1320 KB Output is correct
33 Correct 35 ms 1288 KB Output is correct
34 Correct 37 ms 1328 KB Output is correct
35 Correct 37 ms 1296 KB Output is correct
36 Correct 38 ms 1316 KB Output is correct
37 Correct 63 ms 1288 KB Output is correct
38 Correct 67 ms 1564 KB Output is correct
39 Correct 36 ms 1348 KB Output is correct
40 Correct 48 ms 1304 KB Output is correct
41 Correct 38 ms 1332 KB Output is correct
42 Correct 36 ms 1352 KB Output is correct
43 Correct 66 ms 1332 KB Output is correct
44 Correct 36 ms 1336 KB Output is correct
45 Correct 42 ms 1336 KB Output is correct
46 Correct 64 ms 1540 KB Output is correct
47 Correct 36 ms 1364 KB Output is correct
48 Correct 37 ms 1368 KB Output is correct
49 Correct 43 ms 1328 KB Output is correct
50 Correct 41 ms 1356 KB Output is correct
51 Correct 40 ms 1332 KB Output is correct
52 Correct 40 ms 1352 KB Output is correct
53 Correct 53 ms 1352 KB Output is correct
54 Correct 55 ms 1816 KB Output is correct
55 Correct 68 ms 4112 KB Output is correct
56 Correct 64 ms 4012 KB Output is correct
57 Correct 80 ms 4160 KB Output is correct
58 Correct 26 ms 1312 KB Output is correct
59 Correct 44 ms 1312 KB Output is correct
60 Correct 42 ms 1320 KB Output is correct
61 Correct 38 ms 1356 KB Output is correct
62 Correct 52 ms 1324 KB Output is correct
63 Correct 43 ms 1332 KB Output is correct
64 Correct 39 ms 1352 KB Output is correct
65 Correct 43 ms 1588 KB Output is correct
66 Correct 62 ms 1344 KB Output is correct
67 Correct 42 ms 1328 KB Output is correct
68 Correct 46 ms 1352 KB Output is correct
69 Correct 65 ms 4012 KB Output is correct
70 Correct 80 ms 4012 KB Output is correct
71 Correct 84 ms 4148 KB Output is correct
72 Correct 45 ms 1360 KB Output is correct
73 Correct 40 ms 1356 KB Output is correct
74 Correct 43 ms 1324 KB Output is correct
75 Correct 63 ms 1340 KB Output is correct
76 Correct 63 ms 1336 KB Output is correct
77 Correct 66 ms 1324 KB Output is correct
78 Correct 73 ms 4012 KB Output is correct
79 Correct 65 ms 4148 KB Output is correct
80 Correct 82 ms 4012 KB Output is correct
81 Correct 43 ms 1348 KB Output is correct
82 Correct 38 ms 1340 KB Output is correct
83 Correct 42 ms 1328 KB Output is correct
84 Correct 37 ms 1320 KB Output is correct
85 Correct 37 ms 1356 KB Output is correct
86 Correct 37 ms 1380 KB Output is correct
87 Correct 59 ms 1288 KB Output is correct
88 Correct 38 ms 1340 KB Output is correct
89 Correct 60 ms 1336 KB Output is correct
90 Correct 69 ms 1352 KB Output is correct
91 Correct 38 ms 1368 KB Output is correct
92 Correct 62 ms 1352 KB Output is correct
93 Correct 62 ms 4012 KB Output is correct
94 Correct 65 ms 4164 KB Output is correct
95 Correct 79 ms 4376 KB Output is correct