Submission #973710

# Submission time Handle Problem Language Result Execution time Memory
973710 2024-05-02T09:49:51 Z RaresFelix Food Court (JOI21_foodcourt) C++17
100 / 100
436 ms 57640 KB
#include <bits/stdc++.h>

using namespace std;

#define int ll
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using ii = pair<ll, ll>;

struct ura1 {
    int n;
    vll V, Mi, Lz;
    ura1(int N) : n(N), V(N, 0), Mi(4 * N, 0), Lz(4 * N, 0) {}

    void prop(int u, int s, int d) {
        if(!Lz[u]) return;
        Mi[u] += Lz[u];
        if(s != d) {
            Lz[u << 1] += Lz[u];
            Lz[u << 1 | 1] += Lz[u];
        }
        Lz[u] = 0;
    }

    void update(int l, int r, int v, int u, int s, int d) {
        prop(u, s, d);
        if(r < s || d < l) return;
        if(l <= s && d <= r) {
            Lz[u] += v;
            prop(u, s, d);
            return;
        }
        update(l, r, v, u << 1, s, (s + d) >> 1);
        update(l, r, v, u << 1 | 1, ((s + d) >> 1) + 1, d);
        Mi[u] = min(Mi[u << 1], Mi[u << 1 | 1]);
    }

    const ll INF = 1e18;

    int query(int l, int r, int u, int s, int d) {
        prop(u, s, d);
        if(r < s || d < l) return INF;
        if(l <= s && d <= r) return Mi[u];
        return min(query(l, r, u << 1, s, (s + d) >> 1), 
            query(l, r, u << 1 | 1, ((s + d) >> 1) + 1, d));
    }

    void update(int p, int v) {
        ///update pe pozitie
        update(p, n - 1, v - V[p], 1, 0, n - 1);
        V[p] = v;
    }

    int query(int p) {
        if(p == -1) return 0;
        return query(p, p, 1, 0, n - 1) - min(query(0, p - 1, 1, 0, n - 1), 0ll);
    }
};

struct ura2 {
    ll n;
    vll S;
    ura2(int N) : n(N), S(4 * N) {}

    void update(int p, int v, int u, int s, int d) {
        if(d < p || p < s) return;
        if(s == d) {
            S[u] = v;
            return;
        }
        update(p, v, u << 1, s, (s + d) >> 1);
        update(p, v, u << 1 | 1, ((s + d) >> 1) + 1, d);
        S[u] = S[u << 1] + S[u << 1 | 1];
    }

    int querys(int l, int r, int u, int s, int d) {
        if(d < l || r < s) {
            return 0;
        }
        if(l <= s && d <= r) return S[u];
        return querys(l, r, u << 1, s, (s + d) >> 1)
            + querys(l, r, u << 1 | 1, ((s + d) >> 1) + 1, d);
    }

    int queryp(int nr, int u, int s, int d) {
        if(s == d) return s;
        if(nr > S[u << 1]) return queryp(nr - S[u << 1], u << 1 | 1, ((s + d) >> 1) + 1, d);
        return queryp(nr, u << 1, s, (s + d) >> 1);
    }

    void update(int p, int v) { ///update pe pozitie
        update(p, v, 1, 0, n - 1);
    }
    int sum(int p) { return querys(0, p, 1, 0, n - 1); }
    int query(int nr) { /// va returna pozitia celul a al nr-lea element
        return queryp(nr, 1, 0, n - 1);
    }
};

signed main() {
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    int n, m, q;
    cin >> n >> m >> q;
    vi V1, V2, C2;
    vector<ii> UpV1, UpV2; /// toggle-uri pe timp
    struct query {
        int poz, id, ultV1, ultV2;
    };
    vector<vector<query> > Q(n);
    int nr3 = 0;
    for (int i = 0; i < q; ++i) {
        int tip;
        cin >> tip;
        if (tip == 1) {
            int l, r, c, k;
            cin >> l >> r >> c >> k;
            --l; --r;
            UpV1.push_back({l, V1.size()});
            UpV1.push_back({r + 1, V1.size()});
            UpV2.push_back({l, V2.size()});
            UpV2.push_back({r + 1, V2.size()});

            V1.push_back(k);
            V2.push_back(k);
            C2.push_back(c);
        } else if (tip == 2) {
            int l, r, k;
            cin >> l >> r >> k; 
            --l; --r;
            UpV1.push_back({l, V1.size()});
            UpV1.push_back({r + 1, V1.size()});
            V1.push_back(-k);
        } else {
            int a, b;
            cin >> a >> b;
            --a;
            Q[a].push_back({b, nr3, int(V1.size()) - 1, int(V2.size()) - 1});
            ++nr3;
        }
    }
    sort(UpV1.begin(), UpV1.end());
    sort(UpV2.begin(), UpV2.end());

    int p1 = 0, p2 = 0;
    vi Re(nr3);

    ura1 Sol1(V1.size());
    vi on1(V1.size(), 0);
    ura2 Sol2(V2.size());
    vi on2(V2.size(), 0);

    for(int i = 0; i < n; ++i) {
        while(p1 < UpV1.size() && UpV1[p1].first <= i) {
            //toggle it
            int v = UpV1[p1].second;
            if(!on1[v]) Sol1.update(v, V1[v]);
            else Sol1.update(v, 0);
            on1[v] ^= 1;
            ++p1;
        }

        while(p2 < UpV2.size() && UpV2[p2].first <= i) {
            //toggle it
            int v = UpV2[p2].second;
            if(!on2[v]) Sol2.update(v, V2[v]);
            else Sol2.update(v, 0);
            on2[v] ^= 1;
            ++p2;
        }

        for(auto q : Q[i]) {
            ll nrsuf = Sol1.query(q.ultV1), nrtot = Sol2.sum(q.ultV2);
            ll b = q.poz + nrtot - nrsuf;
            if(b > nrtot) {
                Re[q.id] = 0;
            } else {
                Re[q.id] = C2[Sol2.query(b)];
            }
        }
    }
    for(auto it : Re) cout << it << "\n";
    return 0;
}

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:155:18: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  155 |         while(p1 < UpV1.size() && UpV1[p1].first <= i) {
      |               ~~~^~~~~~~~~~~~~
foodcourt.cpp:164:18: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  164 |         while(p2 < UpV2.size() && UpV2[p2].first <= i) {
      |               ~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 604 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 2 ms 600 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 2 ms 604 KB Output is correct
17 Correct 2 ms 604 KB Output is correct
18 Correct 2 ms 604 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 3 ms 860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 604 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 2 ms 600 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 2 ms 604 KB Output is correct
17 Correct 2 ms 604 KB Output is correct
18 Correct 2 ms 604 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 3 ms 860 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 604 KB Output is correct
23 Correct 2 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 604 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 2 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 2 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 2 ms 604 KB Output is correct
36 Correct 2 ms 604 KB Output is correct
37 Correct 2 ms 600 KB Output is correct
38 Correct 3 ms 860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 86 ms 10224 KB Output is correct
2 Correct 79 ms 11520 KB Output is correct
3 Correct 70 ms 10432 KB Output is correct
4 Correct 70 ms 10184 KB Output is correct
5 Correct 77 ms 11420 KB Output is correct
6 Correct 81 ms 11484 KB Output is correct
7 Correct 35 ms 7984 KB Output is correct
8 Correct 40 ms 8640 KB Output is correct
9 Correct 74 ms 10832 KB Output is correct
10 Correct 73 ms 10612 KB Output is correct
11 Correct 75 ms 10808 KB Output is correct
12 Correct 74 ms 10808 KB Output is correct
13 Correct 68 ms 9868 KB Output is correct
14 Correct 78 ms 11388 KB Output is correct
15 Correct 90 ms 13112 KB Output is correct
16 Correct 93 ms 14012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 338 ms 39428 KB Output is correct
2 Correct 280 ms 32556 KB Output is correct
3 Correct 413 ms 46208 KB Output is correct
4 Correct 301 ms 40004 KB Output is correct
5 Correct 289 ms 37708 KB Output is correct
6 Correct 436 ms 49308 KB Output is correct
7 Correct 162 ms 39036 KB Output is correct
8 Correct 184 ms 41628 KB Output is correct
9 Correct 386 ms 44452 KB Output is correct
10 Correct 377 ms 44528 KB Output is correct
11 Correct 386 ms 48376 KB Output is correct
12 Correct 400 ms 46936 KB Output is correct
13 Correct 391 ms 48060 KB Output is correct
14 Correct 395 ms 48348 KB Output is correct
15 Correct 384 ms 47976 KB Output is correct
16 Correct 401 ms 47204 KB Output is correct
17 Correct 385 ms 47788 KB Output is correct
18 Correct 414 ms 48676 KB Output is correct
19 Correct 402 ms 46800 KB Output is correct
20 Correct 409 ms 47324 KB Output is correct
21 Correct 399 ms 47132 KB Output is correct
22 Correct 414 ms 47824 KB Output is correct
23 Correct 397 ms 49904 KB Output is correct
24 Correct 412 ms 49112 KB Output is correct
25 Correct 342 ms 43700 KB Output is correct
26 Correct 354 ms 44884 KB Output is correct
27 Correct 325 ms 56036 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 604 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 2 ms 600 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 2 ms 604 KB Output is correct
17 Correct 2 ms 604 KB Output is correct
18 Correct 2 ms 604 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 3 ms 860 KB Output is correct
21 Correct 86 ms 10224 KB Output is correct
22 Correct 79 ms 11520 KB Output is correct
23 Correct 70 ms 10432 KB Output is correct
24 Correct 70 ms 10184 KB Output is correct
25 Correct 77 ms 11420 KB Output is correct
26 Correct 81 ms 11484 KB Output is correct
27 Correct 35 ms 7984 KB Output is correct
28 Correct 40 ms 8640 KB Output is correct
29 Correct 74 ms 10832 KB Output is correct
30 Correct 73 ms 10612 KB Output is correct
31 Correct 75 ms 10808 KB Output is correct
32 Correct 74 ms 10808 KB Output is correct
33 Correct 68 ms 9868 KB Output is correct
34 Correct 78 ms 11388 KB Output is correct
35 Correct 90 ms 13112 KB Output is correct
36 Correct 93 ms 14012 KB Output is correct
37 Correct 73 ms 9600 KB Output is correct
38 Correct 66 ms 9348 KB Output is correct
39 Correct 32 ms 7756 KB Output is correct
40 Correct 42 ms 8860 KB Output is correct
41 Correct 75 ms 10848 KB Output is correct
42 Correct 78 ms 10588 KB Output is correct
43 Correct 85 ms 10944 KB Output is correct
44 Correct 81 ms 10880 KB Output is correct
45 Correct 76 ms 10684 KB Output is correct
46 Correct 77 ms 10924 KB Output is correct
47 Correct 45 ms 10404 KB Output is correct
48 Correct 70 ms 10436 KB Output is correct
49 Correct 52 ms 8132 KB Output is correct
50 Correct 65 ms 9928 KB Output is correct
51 Correct 77 ms 11072 KB Output is correct
52 Correct 81 ms 11200 KB Output is correct
53 Correct 71 ms 11200 KB Output is correct
54 Correct 99 ms 13984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 9532 KB Output is correct
2 Correct 77 ms 9952 KB Output is correct
3 Correct 77 ms 10332 KB Output is correct
4 Correct 57 ms 7740 KB Output is correct
5 Correct 75 ms 9132 KB Output is correct
6 Correct 77 ms 10296 KB Output is correct
7 Correct 37 ms 7960 KB Output is correct
8 Correct 43 ms 7216 KB Output is correct
9 Correct 54 ms 10340 KB Output is correct
10 Correct 50 ms 7740 KB Output is correct
11 Correct 83 ms 10412 KB Output is correct
12 Correct 74 ms 10308 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 604 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 2 ms 600 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 2 ms 604 KB Output is correct
17 Correct 2 ms 604 KB Output is correct
18 Correct 2 ms 604 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 3 ms 860 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 604 KB Output is correct
23 Correct 2 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 604 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 2 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 2 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 2 ms 604 KB Output is correct
36 Correct 2 ms 604 KB Output is correct
37 Correct 2 ms 600 KB Output is correct
38 Correct 3 ms 860 KB Output is correct
39 Correct 86 ms 10224 KB Output is correct
40 Correct 79 ms 11520 KB Output is correct
41 Correct 70 ms 10432 KB Output is correct
42 Correct 70 ms 10184 KB Output is correct
43 Correct 77 ms 11420 KB Output is correct
44 Correct 81 ms 11484 KB Output is correct
45 Correct 35 ms 7984 KB Output is correct
46 Correct 40 ms 8640 KB Output is correct
47 Correct 74 ms 10832 KB Output is correct
48 Correct 73 ms 10612 KB Output is correct
49 Correct 75 ms 10808 KB Output is correct
50 Correct 74 ms 10808 KB Output is correct
51 Correct 68 ms 9868 KB Output is correct
52 Correct 78 ms 11388 KB Output is correct
53 Correct 90 ms 13112 KB Output is correct
54 Correct 93 ms 14012 KB Output is correct
55 Correct 73 ms 9600 KB Output is correct
56 Correct 66 ms 9348 KB Output is correct
57 Correct 32 ms 7756 KB Output is correct
58 Correct 42 ms 8860 KB Output is correct
59 Correct 75 ms 10848 KB Output is correct
60 Correct 78 ms 10588 KB Output is correct
61 Correct 85 ms 10944 KB Output is correct
62 Correct 81 ms 10880 KB Output is correct
63 Correct 76 ms 10684 KB Output is correct
64 Correct 77 ms 10924 KB Output is correct
65 Correct 45 ms 10404 KB Output is correct
66 Correct 70 ms 10436 KB Output is correct
67 Correct 52 ms 8132 KB Output is correct
68 Correct 65 ms 9928 KB Output is correct
69 Correct 77 ms 11072 KB Output is correct
70 Correct 81 ms 11200 KB Output is correct
71 Correct 71 ms 11200 KB Output is correct
72 Correct 99 ms 13984 KB Output is correct
73 Correct 69 ms 9532 KB Output is correct
74 Correct 77 ms 9952 KB Output is correct
75 Correct 77 ms 10332 KB Output is correct
76 Correct 57 ms 7740 KB Output is correct
77 Correct 75 ms 9132 KB Output is correct
78 Correct 77 ms 10296 KB Output is correct
79 Correct 37 ms 7960 KB Output is correct
80 Correct 43 ms 7216 KB Output is correct
81 Correct 54 ms 10340 KB Output is correct
82 Correct 50 ms 7740 KB Output is correct
83 Correct 83 ms 10412 KB Output is correct
84 Correct 74 ms 10308 KB Output is correct
85 Correct 71 ms 9116 KB Output is correct
86 Correct 80 ms 10172 KB Output is correct
87 Correct 72 ms 10160 KB Output is correct
88 Correct 87 ms 11384 KB Output is correct
89 Correct 51 ms 7524 KB Output is correct
90 Correct 79 ms 10772 KB Output is correct
91 Correct 64 ms 8836 KB Output is correct
92 Correct 60 ms 8612 KB Output is correct
93 Correct 91 ms 10868 KB Output is correct
94 Correct 76 ms 10680 KB Output is correct
95 Correct 80 ms 10484 KB Output is correct
96 Correct 83 ms 10872 KB Output is correct
97 Correct 78 ms 10816 KB Output is correct
98 Correct 67 ms 9412 KB Output is correct
99 Correct 50 ms 10292 KB Output is correct
100 Correct 63 ms 8804 KB Output is correct
101 Correct 72 ms 10436 KB Output is correct
102 Correct 75 ms 12796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 604 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 2 ms 600 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 2 ms 604 KB Output is correct
17 Correct 2 ms 604 KB Output is correct
18 Correct 2 ms 604 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 3 ms 860 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 604 KB Output is correct
23 Correct 2 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 604 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 2 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 2 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 2 ms 604 KB Output is correct
36 Correct 2 ms 604 KB Output is correct
37 Correct 2 ms 600 KB Output is correct
38 Correct 3 ms 860 KB Output is correct
39 Correct 86 ms 10224 KB Output is correct
40 Correct 79 ms 11520 KB Output is correct
41 Correct 70 ms 10432 KB Output is correct
42 Correct 70 ms 10184 KB Output is correct
43 Correct 77 ms 11420 KB Output is correct
44 Correct 81 ms 11484 KB Output is correct
45 Correct 35 ms 7984 KB Output is correct
46 Correct 40 ms 8640 KB Output is correct
47 Correct 74 ms 10832 KB Output is correct
48 Correct 73 ms 10612 KB Output is correct
49 Correct 75 ms 10808 KB Output is correct
50 Correct 74 ms 10808 KB Output is correct
51 Correct 68 ms 9868 KB Output is correct
52 Correct 78 ms 11388 KB Output is correct
53 Correct 90 ms 13112 KB Output is correct
54 Correct 93 ms 14012 KB Output is correct
55 Correct 338 ms 39428 KB Output is correct
56 Correct 280 ms 32556 KB Output is correct
57 Correct 413 ms 46208 KB Output is correct
58 Correct 301 ms 40004 KB Output is correct
59 Correct 289 ms 37708 KB Output is correct
60 Correct 436 ms 49308 KB Output is correct
61 Correct 162 ms 39036 KB Output is correct
62 Correct 184 ms 41628 KB Output is correct
63 Correct 386 ms 44452 KB Output is correct
64 Correct 377 ms 44528 KB Output is correct
65 Correct 386 ms 48376 KB Output is correct
66 Correct 400 ms 46936 KB Output is correct
67 Correct 391 ms 48060 KB Output is correct
68 Correct 395 ms 48348 KB Output is correct
69 Correct 384 ms 47976 KB Output is correct
70 Correct 401 ms 47204 KB Output is correct
71 Correct 385 ms 47788 KB Output is correct
72 Correct 414 ms 48676 KB Output is correct
73 Correct 402 ms 46800 KB Output is correct
74 Correct 409 ms 47324 KB Output is correct
75 Correct 399 ms 47132 KB Output is correct
76 Correct 414 ms 47824 KB Output is correct
77 Correct 397 ms 49904 KB Output is correct
78 Correct 412 ms 49112 KB Output is correct
79 Correct 342 ms 43700 KB Output is correct
80 Correct 354 ms 44884 KB Output is correct
81 Correct 325 ms 56036 KB Output is correct
82 Correct 73 ms 9600 KB Output is correct
83 Correct 66 ms 9348 KB Output is correct
84 Correct 32 ms 7756 KB Output is correct
85 Correct 42 ms 8860 KB Output is correct
86 Correct 75 ms 10848 KB Output is correct
87 Correct 78 ms 10588 KB Output is correct
88 Correct 85 ms 10944 KB Output is correct
89 Correct 81 ms 10880 KB Output is correct
90 Correct 76 ms 10684 KB Output is correct
91 Correct 77 ms 10924 KB Output is correct
92 Correct 45 ms 10404 KB Output is correct
93 Correct 70 ms 10436 KB Output is correct
94 Correct 52 ms 8132 KB Output is correct
95 Correct 65 ms 9928 KB Output is correct
96 Correct 77 ms 11072 KB Output is correct
97 Correct 81 ms 11200 KB Output is correct
98 Correct 71 ms 11200 KB Output is correct
99 Correct 99 ms 13984 KB Output is correct
100 Correct 69 ms 9532 KB Output is correct
101 Correct 77 ms 9952 KB Output is correct
102 Correct 77 ms 10332 KB Output is correct
103 Correct 57 ms 7740 KB Output is correct
104 Correct 75 ms 9132 KB Output is correct
105 Correct 77 ms 10296 KB Output is correct
106 Correct 37 ms 7960 KB Output is correct
107 Correct 43 ms 7216 KB Output is correct
108 Correct 54 ms 10340 KB Output is correct
109 Correct 50 ms 7740 KB Output is correct
110 Correct 83 ms 10412 KB Output is correct
111 Correct 74 ms 10308 KB Output is correct
112 Correct 71 ms 9116 KB Output is correct
113 Correct 80 ms 10172 KB Output is correct
114 Correct 72 ms 10160 KB Output is correct
115 Correct 87 ms 11384 KB Output is correct
116 Correct 51 ms 7524 KB Output is correct
117 Correct 79 ms 10772 KB Output is correct
118 Correct 64 ms 8836 KB Output is correct
119 Correct 60 ms 8612 KB Output is correct
120 Correct 91 ms 10868 KB Output is correct
121 Correct 76 ms 10680 KB Output is correct
122 Correct 80 ms 10484 KB Output is correct
123 Correct 83 ms 10872 KB Output is correct
124 Correct 78 ms 10816 KB Output is correct
125 Correct 67 ms 9412 KB Output is correct
126 Correct 50 ms 10292 KB Output is correct
127 Correct 63 ms 8804 KB Output is correct
128 Correct 72 ms 10436 KB Output is correct
129 Correct 75 ms 12796 KB Output is correct
130 Correct 412 ms 47744 KB Output is correct
131 Correct 248 ms 32396 KB Output is correct
132 Correct 398 ms 46564 KB Output is correct
133 Correct 403 ms 50420 KB Output is correct
134 Correct 365 ms 44716 KB Output is correct
135 Correct 423 ms 51432 KB Output is correct
136 Correct 389 ms 45480 KB Output is correct
137 Correct 404 ms 45588 KB Output is correct
138 Correct 396 ms 48956 KB Output is correct
139 Correct 417 ms 48708 KB Output is correct
140 Correct 403 ms 48772 KB Output is correct
141 Correct 420 ms 46828 KB Output is correct
142 Correct 409 ms 47980 KB Output is correct
143 Correct 399 ms 48796 KB Output is correct
144 Correct 412 ms 48576 KB Output is correct
145 Correct 421 ms 47828 KB Output is correct
146 Correct 414 ms 50564 KB Output is correct
147 Correct 400 ms 49952 KB Output is correct
148 Correct 414 ms 48780 KB Output is correct
149 Correct 415 ms 50732 KB Output is correct
150 Correct 236 ms 45464 KB Output is correct
151 Correct 349 ms 47540 KB Output is correct
152 Correct 372 ms 48928 KB Output is correct
153 Correct 343 ms 57640 KB Output is correct