Submission #502862

# Submission time Handle Problem Language Result Execution time Memory
502862 2022-01-06T16:20:15 Z Victor Painting Walls (APIO20_paint) C++17
100 / 100
1341 ms 15912 KB
// #pragma GCC target ("avx,avx2,fma")
// #pragma GCC optimize ("Ofast,inline") // O1 - O2 - O3 - Os - Ofast
// #pragma GCC optimize ("unroll-loops")
#include "paint.h"

#include <bits/stdc++.h>

using namespace std;

#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define per(i, a, b) for (int i = (b - 1); i >= (a); --i)
#define trav(a, x) for (auto &a : x)

#define all(x) x.begin(), x.end()
#define sz(x) x.size()
#define pb push_back
#define debug(x) cout << #x << " = " << x << endl

#define umap unordered_map
#define uset unordered_set

typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;

const int INF = 1'000'000'007;

int minimumInstructions(int N, int M, int K, std::vector<int> C, std::vector<int> A, std::vector<std::vector<int>> B) {
    int jmp_back[100005];
    vi colors[100005];
    vector<bool> possible, added;
    possible.assign(N, 0);
    added.resize(2 * M);
    const int n = N, m = M;

    rep(i, 0, m) trav(color, B[i]) colors[color].pb(i);

    vi dp(n, 0), dp2(n, 0), vis(n, n - 1);
    per(i, 0, n) {
        int color = C[i];
        // debug(i);
        trav(person, colors[color]) {
            // cout<<"person = "<<person+1<<" dp[person] = "<<dp[person]<<" vis[person] = "<<vis[person]<<endl;
            if(vis[person]!=i) dp[person]=0;
            dp2[(person - 1 + m) % m] = dp[person] + 1;
            if (dp2[(person - 1 + m) % m] >= m) possible[i] = 1;
        }
        trav(person, colors[color]) vis[(person - 1 + m) % m]=i-1;
        // cout<<endl;
        dp.swap(dp2);
    }

    int val = -INF;
    rep(i, 0, n) {
        if (possible[i]) val = i;
        jmp_back[i] = val;
    }

    int pos = 0, ans = 0;
    while (pos < n) {
        int nxt_pos = jmp_back[pos];
        if (nxt_pos + m > pos) {
            pos = nxt_pos + m;
            ++ans;

        } else
            return -1;
    }
    return ans;
}
/*
int main() {
    int N, M, K;
    assert(3 == scanf("%d %d %d", &N, &M, &K));

    std::vector<int> C(N);
    for (int i = 0; i < N; ++i) {
        assert(1 == scanf("%d", &C[i]));
    }

    std::vector<int> A(M);
    std::vector<std::vector<int>> B(M);
    for (int i = 0; i < M; ++i) {
        assert(1 == scanf("%d", &A[i]));
        B[i].resize(A[i]);
        for (int j = 0; j < A[i]; ++j) {
            assert(1 == scanf("%d", &B[i][j]));
        }
    }

    int minimum_instructions = minimumInstructions(N, M, K, C, A, B);
    printf("%d\n", minimum_instructions);

    return 0;
}*/
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3020 KB Output is correct
2 Correct 2 ms 2976 KB Output is correct
3 Correct 2 ms 3020 KB Output is correct
4 Correct 2 ms 3020 KB Output is correct
5 Correct 2 ms 3020 KB Output is correct
6 Correct 2 ms 3020 KB Output is correct
7 Correct 2 ms 3020 KB Output is correct
8 Correct 2 ms 3020 KB Output is correct
9 Correct 2 ms 3020 KB Output is correct
10 Correct 2 ms 3020 KB Output is correct
11 Correct 2 ms 2976 KB Output is correct
12 Correct 2 ms 2984 KB Output is correct
13 Correct 2 ms 3020 KB Output is correct
14 Correct 2 ms 2988 KB Output is correct
15 Correct 3 ms 3020 KB Output is correct
16 Correct 2 ms 3020 KB Output is correct
17 Correct 2 ms 3020 KB Output is correct
18 Correct 2 ms 3020 KB Output is correct
19 Correct 2 ms 3020 KB Output is correct
20 Correct 2 ms 3020 KB Output is correct
21 Correct 2 ms 3020 KB Output is correct
22 Correct 19 ms 7500 KB Output is correct
23 Correct 21 ms 7452 KB Output is correct
24 Correct 19 ms 7504 KB Output is correct
25 Correct 6 ms 3352 KB Output is correct
26 Correct 5 ms 3348 KB Output is correct
27 Correct 5 ms 3376 KB Output is correct
28 Correct 4 ms 3404 KB Output is correct
29 Correct 4 ms 3404 KB Output is correct
30 Correct 6 ms 3356 KB Output is correct
31 Correct 13 ms 4656 KB Output is correct
32 Correct 8 ms 4556 KB Output is correct
33 Correct 9 ms 4556 KB Output is correct
34 Correct 8 ms 4436 KB Output is correct
35 Correct 9 ms 4548 KB Output is correct
36 Correct 8 ms 4508 KB Output is correct
37 Correct 28 ms 8140 KB Output is correct
38 Correct 26 ms 8156 KB Output is correct
39 Correct 28 ms 8132 KB Output is correct
40 Correct 12 ms 4940 KB Output is correct
41 Correct 8 ms 4220 KB Output is correct
42 Correct 13 ms 5068 KB Output is correct
43 Correct 10 ms 4428 KB Output is correct
44 Correct 8 ms 4300 KB Output is correct
45 Correct 13 ms 5116 KB Output is correct
46 Correct 45 ms 14020 KB Output is correct
47 Correct 29 ms 9352 KB Output is correct
48 Correct 32 ms 11908 KB Output is correct
49 Correct 51 ms 12304 KB Output is correct
50 Correct 41 ms 12080 KB Output is correct
51 Correct 30 ms 9856 KB Output is correct
52 Correct 12 ms 5196 KB Output is correct
53 Correct 11 ms 5168 KB Output is correct
54 Correct 13 ms 5100 KB Output is correct
55 Correct 14 ms 5156 KB Output is correct
56 Correct 14 ms 5196 KB Output is correct
57 Correct 13 ms 5088 KB Output is correct
58 Correct 56 ms 14868 KB Output is correct
59 Correct 46 ms 14916 KB Output is correct
60 Correct 46 ms 14928 KB Output is correct
61 Correct 68 ms 14904 KB Output is correct
62 Correct 51 ms 14912 KB Output is correct
63 Correct 52 ms 15036 KB Output is correct
64 Correct 70 ms 14156 KB Output is correct
65 Correct 59 ms 14184 KB Output is correct
66 Correct 53 ms 14120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3020 KB Output is correct
2 Correct 2 ms 2976 KB Output is correct
3 Correct 2 ms 3020 KB Output is correct
4 Correct 2 ms 3020 KB Output is correct
5 Correct 2 ms 3020 KB Output is correct
6 Correct 2 ms 3020 KB Output is correct
7 Correct 2 ms 3020 KB Output is correct
8 Correct 2 ms 3020 KB Output is correct
9 Correct 2 ms 3020 KB Output is correct
10 Correct 2 ms 3020 KB Output is correct
11 Correct 2 ms 2976 KB Output is correct
12 Correct 2 ms 2984 KB Output is correct
13 Correct 2 ms 3020 KB Output is correct
14 Correct 2 ms 2988 KB Output is correct
15 Correct 3 ms 3020 KB Output is correct
16 Correct 2 ms 3020 KB Output is correct
17 Correct 2 ms 3020 KB Output is correct
18 Correct 2 ms 3020 KB Output is correct
19 Correct 2 ms 3020 KB Output is correct
20 Correct 2 ms 3020 KB Output is correct
21 Correct 2 ms 3020 KB Output is correct
22 Correct 2 ms 3020 KB Output is correct
23 Correct 2 ms 3020 KB Output is correct
24 Correct 2 ms 2980 KB Output is correct
25 Correct 2 ms 2984 KB Output is correct
26 Correct 3 ms 3020 KB Output is correct
27 Correct 2 ms 2980 KB Output is correct
28 Correct 2 ms 3020 KB Output is correct
29 Correct 3 ms 3020 KB Output is correct
30 Correct 2 ms 3020 KB Output is correct
31 Correct 2 ms 3020 KB Output is correct
32 Correct 2 ms 3020 KB Output is correct
33 Correct 2 ms 3020 KB Output is correct
34 Correct 3 ms 3020 KB Output is correct
35 Correct 2 ms 3020 KB Output is correct
36 Correct 2 ms 2984 KB Output is correct
37 Correct 2 ms 3020 KB Output is correct
38 Correct 2 ms 2984 KB Output is correct
39 Correct 2 ms 3012 KB Output is correct
40 Correct 2 ms 3036 KB Output is correct
41 Correct 2 ms 3020 KB Output is correct
42 Correct 2 ms 3020 KB Output is correct
43 Correct 3 ms 3020 KB Output is correct
44 Correct 2 ms 3020 KB Output is correct
45 Correct 3 ms 3020 KB Output is correct
46 Correct 3 ms 3020 KB Output is correct
47 Correct 2 ms 3020 KB Output is correct
48 Correct 2 ms 3020 KB Output is correct
49 Correct 2 ms 3020 KB Output is correct
50 Correct 2 ms 3020 KB Output is correct
51 Correct 2 ms 3020 KB Output is correct
52 Correct 2 ms 2980 KB Output is correct
53 Correct 2 ms 3020 KB Output is correct
54 Correct 3 ms 2984 KB Output is correct
55 Correct 2 ms 2980 KB Output is correct
56 Correct 2 ms 3020 KB Output is correct
57 Correct 2 ms 2976 KB Output is correct
58 Correct 2 ms 3020 KB Output is correct
59 Correct 3 ms 3020 KB Output is correct
60 Correct 2 ms 3020 KB Output is correct
61 Correct 2 ms 3020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3020 KB Output is correct
2 Correct 2 ms 3020 KB Output is correct
3 Correct 2 ms 3020 KB Output is correct
4 Correct 2 ms 2976 KB Output is correct
5 Correct 2 ms 3020 KB Output is correct
6 Correct 2 ms 3020 KB Output is correct
7 Correct 2 ms 3020 KB Output is correct
8 Correct 2 ms 3020 KB Output is correct
9 Correct 2 ms 3020 KB Output is correct
10 Correct 2 ms 3020 KB Output is correct
11 Correct 2 ms 3020 KB Output is correct
12 Correct 2 ms 3020 KB Output is correct
13 Correct 2 ms 2976 KB Output is correct
14 Correct 2 ms 2984 KB Output is correct
15 Correct 2 ms 3020 KB Output is correct
16 Correct 2 ms 2988 KB Output is correct
17 Correct 3 ms 3020 KB Output is correct
18 Correct 2 ms 3020 KB Output is correct
19 Correct 2 ms 3020 KB Output is correct
20 Correct 2 ms 3020 KB Output is correct
21 Correct 2 ms 3020 KB Output is correct
22 Correct 2 ms 3020 KB Output is correct
23 Correct 2 ms 3020 KB Output is correct
24 Correct 19 ms 7500 KB Output is correct
25 Correct 21 ms 7452 KB Output is correct
26 Correct 19 ms 7504 KB Output is correct
27 Correct 2 ms 2980 KB Output is correct
28 Correct 2 ms 2984 KB Output is correct
29 Correct 3 ms 3020 KB Output is correct
30 Correct 2 ms 2980 KB Output is correct
31 Correct 2 ms 3020 KB Output is correct
32 Correct 3 ms 3020 KB Output is correct
33 Correct 2 ms 3020 KB Output is correct
34 Correct 2 ms 3020 KB Output is correct
35 Correct 2 ms 3020 KB Output is correct
36 Correct 2 ms 3020 KB Output is correct
37 Correct 3 ms 3020 KB Output is correct
38 Correct 2 ms 3020 KB Output is correct
39 Correct 2 ms 2984 KB Output is correct
40 Correct 2 ms 3020 KB Output is correct
41 Correct 2 ms 2984 KB Output is correct
42 Correct 2 ms 3012 KB Output is correct
43 Correct 2 ms 3036 KB Output is correct
44 Correct 2 ms 3020 KB Output is correct
45 Correct 2 ms 3020 KB Output is correct
46 Correct 3 ms 3020 KB Output is correct
47 Correct 2 ms 3020 KB Output is correct
48 Correct 3 ms 3020 KB Output is correct
49 Correct 3 ms 3020 KB Output is correct
50 Correct 2 ms 3020 KB Output is correct
51 Correct 2 ms 3020 KB Output is correct
52 Correct 2 ms 3020 KB Output is correct
53 Correct 2 ms 3020 KB Output is correct
54 Correct 2 ms 3020 KB Output is correct
55 Correct 2 ms 2980 KB Output is correct
56 Correct 2 ms 3020 KB Output is correct
57 Correct 3 ms 2984 KB Output is correct
58 Correct 2 ms 2980 KB Output is correct
59 Correct 2 ms 3020 KB Output is correct
60 Correct 2 ms 2976 KB Output is correct
61 Correct 2 ms 3020 KB Output is correct
62 Correct 3 ms 3020 KB Output is correct
63 Correct 2 ms 3020 KB Output is correct
64 Correct 2 ms 3020 KB Output is correct
65 Correct 3 ms 3020 KB Output is correct
66 Correct 2 ms 2972 KB Output is correct
67 Correct 3 ms 2976 KB Output is correct
68 Correct 3 ms 3020 KB Output is correct
69 Correct 3 ms 3020 KB Output is correct
70 Correct 4 ms 3276 KB Output is correct
71 Correct 4 ms 3276 KB Output is correct
72 Correct 4 ms 3276 KB Output is correct
73 Correct 3 ms 3148 KB Output is correct
74 Correct 3 ms 3252 KB Output is correct
75 Correct 3 ms 3152 KB Output is correct
76 Correct 23 ms 6304 KB Output is correct
77 Correct 20 ms 6712 KB Output is correct
78 Correct 23 ms 7236 KB Output is correct
79 Correct 4 ms 3020 KB Output is correct
80 Correct 4 ms 3020 KB Output is correct
81 Correct 4 ms 3020 KB Output is correct
82 Correct 4 ms 3020 KB Output is correct
83 Correct 4 ms 3020 KB Output is correct
84 Correct 4 ms 3276 KB Output is correct
85 Correct 4 ms 3276 KB Output is correct
86 Correct 4 ms 3228 KB Output is correct
87 Correct 4 ms 3224 KB Output is correct
88 Correct 5 ms 3304 KB Output is correct
89 Correct 4 ms 3276 KB Output is correct
90 Correct 25 ms 7640 KB Output is correct
91 Correct 26 ms 7680 KB Output is correct
92 Correct 25 ms 7568 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3020 KB Output is correct
2 Correct 2 ms 3020 KB Output is correct
3 Correct 2 ms 3020 KB Output is correct
4 Correct 2 ms 2976 KB Output is correct
5 Correct 2 ms 3020 KB Output is correct
6 Correct 2 ms 3020 KB Output is correct
7 Correct 2 ms 3020 KB Output is correct
8 Correct 2 ms 3020 KB Output is correct
9 Correct 2 ms 3020 KB Output is correct
10 Correct 2 ms 3020 KB Output is correct
11 Correct 2 ms 3020 KB Output is correct
12 Correct 2 ms 3020 KB Output is correct
13 Correct 2 ms 2976 KB Output is correct
14 Correct 2 ms 2984 KB Output is correct
15 Correct 2 ms 3020 KB Output is correct
16 Correct 2 ms 2988 KB Output is correct
17 Correct 3 ms 3020 KB Output is correct
18 Correct 2 ms 3020 KB Output is correct
19 Correct 2 ms 3020 KB Output is correct
20 Correct 2 ms 3020 KB Output is correct
21 Correct 2 ms 3020 KB Output is correct
22 Correct 2 ms 3020 KB Output is correct
23 Correct 2 ms 3020 KB Output is correct
24 Correct 19 ms 7500 KB Output is correct
25 Correct 21 ms 7452 KB Output is correct
26 Correct 19 ms 7504 KB Output is correct
27 Correct 6 ms 3352 KB Output is correct
28 Correct 5 ms 3348 KB Output is correct
29 Correct 5 ms 3376 KB Output is correct
30 Correct 4 ms 3404 KB Output is correct
31 Correct 4 ms 3404 KB Output is correct
32 Correct 6 ms 3356 KB Output is correct
33 Correct 13 ms 4656 KB Output is correct
34 Correct 8 ms 4556 KB Output is correct
35 Correct 9 ms 4556 KB Output is correct
36 Correct 8 ms 4436 KB Output is correct
37 Correct 9 ms 4548 KB Output is correct
38 Correct 8 ms 4508 KB Output is correct
39 Correct 28 ms 8140 KB Output is correct
40 Correct 26 ms 8156 KB Output is correct
41 Correct 28 ms 8132 KB Output is correct
42 Correct 2 ms 2980 KB Output is correct
43 Correct 2 ms 2984 KB Output is correct
44 Correct 3 ms 3020 KB Output is correct
45 Correct 2 ms 2980 KB Output is correct
46 Correct 2 ms 3020 KB Output is correct
47 Correct 3 ms 3020 KB Output is correct
48 Correct 2 ms 3020 KB Output is correct
49 Correct 2 ms 3020 KB Output is correct
50 Correct 2 ms 3020 KB Output is correct
51 Correct 2 ms 3020 KB Output is correct
52 Correct 3 ms 3020 KB Output is correct
53 Correct 2 ms 3020 KB Output is correct
54 Correct 2 ms 2984 KB Output is correct
55 Correct 2 ms 3020 KB Output is correct
56 Correct 2 ms 2984 KB Output is correct
57 Correct 2 ms 3012 KB Output is correct
58 Correct 2 ms 3036 KB Output is correct
59 Correct 2 ms 3020 KB Output is correct
60 Correct 2 ms 3020 KB Output is correct
61 Correct 3 ms 3020 KB Output is correct
62 Correct 2 ms 3020 KB Output is correct
63 Correct 3 ms 3020 KB Output is correct
64 Correct 3 ms 3020 KB Output is correct
65 Correct 2 ms 3020 KB Output is correct
66 Correct 2 ms 3020 KB Output is correct
67 Correct 2 ms 3020 KB Output is correct
68 Correct 2 ms 3020 KB Output is correct
69 Correct 2 ms 3020 KB Output is correct
70 Correct 2 ms 2980 KB Output is correct
71 Correct 2 ms 3020 KB Output is correct
72 Correct 3 ms 2984 KB Output is correct
73 Correct 2 ms 2980 KB Output is correct
74 Correct 2 ms 3020 KB Output is correct
75 Correct 2 ms 2976 KB Output is correct
76 Correct 2 ms 3020 KB Output is correct
77 Correct 3 ms 3020 KB Output is correct
78 Correct 2 ms 3020 KB Output is correct
79 Correct 2 ms 3020 KB Output is correct
80 Correct 3 ms 3020 KB Output is correct
81 Correct 2 ms 2972 KB Output is correct
82 Correct 3 ms 2976 KB Output is correct
83 Correct 3 ms 3020 KB Output is correct
84 Correct 3 ms 3020 KB Output is correct
85 Correct 4 ms 3276 KB Output is correct
86 Correct 4 ms 3276 KB Output is correct
87 Correct 4 ms 3276 KB Output is correct
88 Correct 3 ms 3148 KB Output is correct
89 Correct 3 ms 3252 KB Output is correct
90 Correct 3 ms 3152 KB Output is correct
91 Correct 23 ms 6304 KB Output is correct
92 Correct 20 ms 6712 KB Output is correct
93 Correct 23 ms 7236 KB Output is correct
94 Correct 4 ms 3020 KB Output is correct
95 Correct 4 ms 3020 KB Output is correct
96 Correct 4 ms 3020 KB Output is correct
97 Correct 4 ms 3020 KB Output is correct
98 Correct 4 ms 3020 KB Output is correct
99 Correct 4 ms 3276 KB Output is correct
100 Correct 4 ms 3276 KB Output is correct
101 Correct 4 ms 3228 KB Output is correct
102 Correct 4 ms 3224 KB Output is correct
103 Correct 5 ms 3304 KB Output is correct
104 Correct 4 ms 3276 KB Output is correct
105 Correct 25 ms 7640 KB Output is correct
106 Correct 26 ms 7680 KB Output is correct
107 Correct 25 ms 7568 KB Output is correct
108 Correct 6 ms 3404 KB Output is correct
109 Correct 199 ms 3352 KB Output is correct
110 Correct 107 ms 3360 KB Output is correct
111 Correct 82 ms 3352 KB Output is correct
112 Correct 101 ms 3444 KB Output is correct
113 Correct 67 ms 3372 KB Output is correct
114 Correct 12 ms 4780 KB Output is correct
115 Correct 13 ms 4636 KB Output is correct
116 Correct 16 ms 5028 KB Output is correct
117 Correct 20 ms 4676 KB Output is correct
118 Correct 18 ms 4840 KB Output is correct
119 Correct 13 ms 4472 KB Output is correct
120 Correct 29 ms 6204 KB Output is correct
121 Correct 6 ms 3788 KB Output is correct
122 Correct 21 ms 6512 KB Output is correct
123 Correct 6 ms 3660 KB Output is correct
124 Correct 25 ms 7124 KB Output is correct
125 Correct 8 ms 4048 KB Output is correct
126 Correct 7 ms 4144 KB Output is correct
127 Correct 12 ms 4488 KB Output is correct
128 Correct 7 ms 4044 KB Output is correct
129 Correct 8 ms 4012 KB Output is correct
130 Correct 5 ms 3464 KB Output is correct
131 Correct 280 ms 3476 KB Output is correct
132 Correct 199 ms 3532 KB Output is correct
133 Correct 169 ms 3568 KB Output is correct
134 Correct 152 ms 3500 KB Output is correct
135 Correct 127 ms 3532 KB Output is correct
136 Correct 17 ms 5340 KB Output is correct
137 Correct 18 ms 5392 KB Output is correct
138 Correct 19 ms 5364 KB Output is correct
139 Correct 19 ms 5336 KB Output is correct
140 Correct 18 ms 5324 KB Output is correct
141 Correct 18 ms 5392 KB Output is correct
142 Correct 32 ms 8192 KB Output is correct
143 Correct 9 ms 4300 KB Output is correct
144 Correct 33 ms 8276 KB Output is correct
145 Correct 8 ms 4300 KB Output is correct
146 Correct 33 ms 8208 KB Output is correct
147 Correct 10 ms 4320 KB Output is correct
148 Correct 10 ms 4648 KB Output is correct
149 Correct 10 ms 4648 KB Output is correct
150 Correct 11 ms 4684 KB Output is correct
151 Correct 9 ms 4504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3020 KB Output is correct
2 Correct 2 ms 3020 KB Output is correct
3 Correct 2 ms 3020 KB Output is correct
4 Correct 2 ms 2976 KB Output is correct
5 Correct 2 ms 3020 KB Output is correct
6 Correct 2 ms 3020 KB Output is correct
7 Correct 2 ms 3020 KB Output is correct
8 Correct 2 ms 3020 KB Output is correct
9 Correct 2 ms 3020 KB Output is correct
10 Correct 2 ms 3020 KB Output is correct
11 Correct 2 ms 3020 KB Output is correct
12 Correct 2 ms 3020 KB Output is correct
13 Correct 2 ms 2976 KB Output is correct
14 Correct 2 ms 2984 KB Output is correct
15 Correct 2 ms 3020 KB Output is correct
16 Correct 2 ms 2988 KB Output is correct
17 Correct 3 ms 3020 KB Output is correct
18 Correct 2 ms 3020 KB Output is correct
19 Correct 2 ms 3020 KB Output is correct
20 Correct 2 ms 3020 KB Output is correct
21 Correct 2 ms 3020 KB Output is correct
22 Correct 2 ms 3020 KB Output is correct
23 Correct 2 ms 3020 KB Output is correct
24 Correct 19 ms 7500 KB Output is correct
25 Correct 21 ms 7452 KB Output is correct
26 Correct 19 ms 7504 KB Output is correct
27 Correct 6 ms 3352 KB Output is correct
28 Correct 5 ms 3348 KB Output is correct
29 Correct 5 ms 3376 KB Output is correct
30 Correct 4 ms 3404 KB Output is correct
31 Correct 4 ms 3404 KB Output is correct
32 Correct 6 ms 3356 KB Output is correct
33 Correct 13 ms 4656 KB Output is correct
34 Correct 8 ms 4556 KB Output is correct
35 Correct 9 ms 4556 KB Output is correct
36 Correct 8 ms 4436 KB Output is correct
37 Correct 9 ms 4548 KB Output is correct
38 Correct 8 ms 4508 KB Output is correct
39 Correct 28 ms 8140 KB Output is correct
40 Correct 26 ms 8156 KB Output is correct
41 Correct 28 ms 8132 KB Output is correct
42 Correct 12 ms 4940 KB Output is correct
43 Correct 8 ms 4220 KB Output is correct
44 Correct 13 ms 5068 KB Output is correct
45 Correct 10 ms 4428 KB Output is correct
46 Correct 8 ms 4300 KB Output is correct
47 Correct 13 ms 5116 KB Output is correct
48 Correct 45 ms 14020 KB Output is correct
49 Correct 29 ms 9352 KB Output is correct
50 Correct 32 ms 11908 KB Output is correct
51 Correct 51 ms 12304 KB Output is correct
52 Correct 41 ms 12080 KB Output is correct
53 Correct 30 ms 9856 KB Output is correct
54 Correct 12 ms 5196 KB Output is correct
55 Correct 11 ms 5168 KB Output is correct
56 Correct 13 ms 5100 KB Output is correct
57 Correct 14 ms 5156 KB Output is correct
58 Correct 14 ms 5196 KB Output is correct
59 Correct 13 ms 5088 KB Output is correct
60 Correct 56 ms 14868 KB Output is correct
61 Correct 46 ms 14916 KB Output is correct
62 Correct 46 ms 14928 KB Output is correct
63 Correct 68 ms 14904 KB Output is correct
64 Correct 51 ms 14912 KB Output is correct
65 Correct 52 ms 15036 KB Output is correct
66 Correct 70 ms 14156 KB Output is correct
67 Correct 59 ms 14184 KB Output is correct
68 Correct 53 ms 14120 KB Output is correct
69 Correct 2 ms 2980 KB Output is correct
70 Correct 2 ms 2984 KB Output is correct
71 Correct 3 ms 3020 KB Output is correct
72 Correct 2 ms 2980 KB Output is correct
73 Correct 2 ms 3020 KB Output is correct
74 Correct 3 ms 3020 KB Output is correct
75 Correct 2 ms 3020 KB Output is correct
76 Correct 2 ms 3020 KB Output is correct
77 Correct 2 ms 3020 KB Output is correct
78 Correct 2 ms 3020 KB Output is correct
79 Correct 3 ms 3020 KB Output is correct
80 Correct 2 ms 3020 KB Output is correct
81 Correct 2 ms 2984 KB Output is correct
82 Correct 2 ms 3020 KB Output is correct
83 Correct 2 ms 2984 KB Output is correct
84 Correct 2 ms 3012 KB Output is correct
85 Correct 2 ms 3036 KB Output is correct
86 Correct 2 ms 3020 KB Output is correct
87 Correct 2 ms 3020 KB Output is correct
88 Correct 3 ms 3020 KB Output is correct
89 Correct 2 ms 3020 KB Output is correct
90 Correct 3 ms 3020 KB Output is correct
91 Correct 3 ms 3020 KB Output is correct
92 Correct 2 ms 3020 KB Output is correct
93 Correct 2 ms 3020 KB Output is correct
94 Correct 2 ms 3020 KB Output is correct
95 Correct 2 ms 3020 KB Output is correct
96 Correct 2 ms 3020 KB Output is correct
97 Correct 2 ms 2980 KB Output is correct
98 Correct 2 ms 3020 KB Output is correct
99 Correct 3 ms 2984 KB Output is correct
100 Correct 2 ms 2980 KB Output is correct
101 Correct 2 ms 3020 KB Output is correct
102 Correct 2 ms 2976 KB Output is correct
103 Correct 2 ms 3020 KB Output is correct
104 Correct 3 ms 3020 KB Output is correct
105 Correct 2 ms 3020 KB Output is correct
106 Correct 2 ms 3020 KB Output is correct
107 Correct 3 ms 3020 KB Output is correct
108 Correct 2 ms 2972 KB Output is correct
109 Correct 3 ms 2976 KB Output is correct
110 Correct 3 ms 3020 KB Output is correct
111 Correct 3 ms 3020 KB Output is correct
112 Correct 4 ms 3276 KB Output is correct
113 Correct 4 ms 3276 KB Output is correct
114 Correct 4 ms 3276 KB Output is correct
115 Correct 3 ms 3148 KB Output is correct
116 Correct 3 ms 3252 KB Output is correct
117 Correct 3 ms 3152 KB Output is correct
118 Correct 23 ms 6304 KB Output is correct
119 Correct 20 ms 6712 KB Output is correct
120 Correct 23 ms 7236 KB Output is correct
121 Correct 4 ms 3020 KB Output is correct
122 Correct 4 ms 3020 KB Output is correct
123 Correct 4 ms 3020 KB Output is correct
124 Correct 4 ms 3020 KB Output is correct
125 Correct 4 ms 3020 KB Output is correct
126 Correct 4 ms 3276 KB Output is correct
127 Correct 4 ms 3276 KB Output is correct
128 Correct 4 ms 3228 KB Output is correct
129 Correct 4 ms 3224 KB Output is correct
130 Correct 5 ms 3304 KB Output is correct
131 Correct 4 ms 3276 KB Output is correct
132 Correct 25 ms 7640 KB Output is correct
133 Correct 26 ms 7680 KB Output is correct
134 Correct 25 ms 7568 KB Output is correct
135 Correct 6 ms 3404 KB Output is correct
136 Correct 199 ms 3352 KB Output is correct
137 Correct 107 ms 3360 KB Output is correct
138 Correct 82 ms 3352 KB Output is correct
139 Correct 101 ms 3444 KB Output is correct
140 Correct 67 ms 3372 KB Output is correct
141 Correct 12 ms 4780 KB Output is correct
142 Correct 13 ms 4636 KB Output is correct
143 Correct 16 ms 5028 KB Output is correct
144 Correct 20 ms 4676 KB Output is correct
145 Correct 18 ms 4840 KB Output is correct
146 Correct 13 ms 4472 KB Output is correct
147 Correct 29 ms 6204 KB Output is correct
148 Correct 6 ms 3788 KB Output is correct
149 Correct 21 ms 6512 KB Output is correct
150 Correct 6 ms 3660 KB Output is correct
151 Correct 25 ms 7124 KB Output is correct
152 Correct 8 ms 4048 KB Output is correct
153 Correct 7 ms 4144 KB Output is correct
154 Correct 12 ms 4488 KB Output is correct
155 Correct 7 ms 4044 KB Output is correct
156 Correct 8 ms 4012 KB Output is correct
157 Correct 5 ms 3464 KB Output is correct
158 Correct 280 ms 3476 KB Output is correct
159 Correct 199 ms 3532 KB Output is correct
160 Correct 169 ms 3568 KB Output is correct
161 Correct 152 ms 3500 KB Output is correct
162 Correct 127 ms 3532 KB Output is correct
163 Correct 17 ms 5340 KB Output is correct
164 Correct 18 ms 5392 KB Output is correct
165 Correct 19 ms 5364 KB Output is correct
166 Correct 19 ms 5336 KB Output is correct
167 Correct 18 ms 5324 KB Output is correct
168 Correct 18 ms 5392 KB Output is correct
169 Correct 32 ms 8192 KB Output is correct
170 Correct 9 ms 4300 KB Output is correct
171 Correct 33 ms 8276 KB Output is correct
172 Correct 8 ms 4300 KB Output is correct
173 Correct 33 ms 8208 KB Output is correct
174 Correct 10 ms 4320 KB Output is correct
175 Correct 10 ms 4648 KB Output is correct
176 Correct 10 ms 4648 KB Output is correct
177 Correct 11 ms 4684 KB Output is correct
178 Correct 9 ms 4504 KB Output is correct
179 Correct 9 ms 4264 KB Output is correct
180 Correct 533 ms 4212 KB Output is correct
181 Correct 601 ms 4756 KB Output is correct
182 Correct 780 ms 5316 KB Output is correct
183 Correct 390 ms 4576 KB Output is correct
184 Correct 323 ms 4528 KB Output is correct
185 Correct 27 ms 7768 KB Output is correct
186 Correct 27 ms 9400 KB Output is correct
187 Correct 38 ms 8780 KB Output is correct
188 Correct 37 ms 8544 KB Output is correct
189 Correct 36 ms 8412 KB Output is correct
190 Correct 54 ms 9536 KB Output is correct
191 Correct 32 ms 9088 KB Output is correct
192 Correct 26 ms 7592 KB Output is correct
193 Correct 27 ms 7060 KB Output is correct
194 Correct 15 ms 5196 KB Output is correct
195 Correct 1341 ms 5276 KB Output is correct
196 Correct 983 ms 5304 KB Output is correct
197 Correct 826 ms 5448 KB Output is correct
198 Correct 697 ms 5444 KB Output is correct
199 Correct 609 ms 5392 KB Output is correct
200 Correct 74 ms 15912 KB Output is correct
201 Correct 64 ms 15760 KB Output is correct
202 Correct 69 ms 15808 KB Output is correct
203 Correct 62 ms 15816 KB Output is correct
204 Correct 62 ms 15712 KB Output is correct
205 Correct 64 ms 15744 KB Output is correct
206 Correct 83 ms 14732 KB Output is correct
207 Correct 52 ms 14004 KB Output is correct
208 Correct 55 ms 14736 KB Output is correct
209 Correct 59 ms 14096 KB Output is correct
210 Correct 58 ms 14664 KB Output is correct
211 Correct 47 ms 14020 KB Output is correct
212 Correct 55 ms 15552 KB Output is correct
213 Correct 56 ms 12440 KB Output is correct
214 Correct 51 ms 12020 KB Output is correct
215 Correct 47 ms 11824 KB Output is correct