Submission #540556

# Submission time Handle Problem Language Result Execution time Memory
540556 2022-03-21T01:16:24 Z LittleCube Food Court (JOI21_foodcourt) C++14
100 / 100
496 ms 41220 KB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;

ll N, M, Q, t2[1000005], neg[1000005], pos[1000005], seg[1000005], lazy[1000005], ans[250005], color[250005];
vector<pair<int, pair<int, pll>>> modifies, colors;
vector<pair<int, pll>> queries;

void push(int i, ll val)
{
    if (val > 0)
        pos[i] += val;
    else if (val < 0)
    {
        if (pos[i] + val > 0)
            pos[i] += val;
        else
        {
            neg[i] += pos[i] + val;
            pos[i] = 0;
        }
    }
}

void t12(int mL, int mR, ll val, int i = 1, int L = 1, int R = N)
{
    if (mL <= L && R <= mR)
    {
        if (val < 0)
            t2[i] += val;
        push(i, val);
    }
    else if (R < mL || mR < L)
        return;
    else
    {
        int mid = (L + R) / 2;
        push(i * 2, neg[i]);
        push(i * 2 + 1, neg[i]);
        push(i * 2, pos[i]);
        push(i * 2 + 1, pos[i]);
        pos[i] = neg[i] = 0;
        t12(mL, mR, val, i * 2, L, mid);
        t12(mL, mR, val, i * 2 + 1, mid + 1, R);
    }
}

pll query(int p, int i = 1, int L = 1, int R = N)
{
    if (L == R)
        return {neg[i], pos[i]};
    else
    {
        int mid = (L + R) / 2;
        push(i * 2, neg[i]);
        push(i * 2 + 1, neg[i]);
        push(i * 2, pos[i]);
        push(i * 2 + 1, pos[i]);
        pos[i] = neg[i] = 0;
        if (p <= mid)
            return query(p, i * 2, L, mid);
        else
            return query(p, i * 2 + 1, mid + 1, R);
    }
}

ll qt2(int p, int i = 1, int L = 1, int R = N)
{
    if (L == R)
        return t2[i];
    else
    {
        int mid = (L + R) / 2;
        push(i * 2, neg[i]);
        push(i * 2 + 1, neg[i]);
        push(i * 2, pos[i]);
        push(i * 2 + 1, pos[i]);
        pos[i] = neg[i] = 0;
        if (p <= mid)
            return t2[i] + qt2(p, i * 2, L, mid);
        else
            return t2[i] + qt2(p, i * 2 + 1, mid + 1, R);
    }
}

void modify(int mL, int mR, ll val, int i = 1, int L = 1, int R = Q + 1)
{
    if (mL <= L && R <= mR)
        lazy[i] += val;
    else if (R < mL || mR < L)
        return;
    else
    {
        int mid = (L + R) / 2;
        lazy[i * 2] += lazy[i];
        lazy[i * 2 + 1] += lazy[i];
        lazy[i] = 0;
        modify(mL, mR, val, i * 2, L, mid);
        modify(mL, mR, val, i * 2 + 1, mid + 1, R);
        seg[i] = seg[i * 2 + 1] + lazy[i * 2 + 1];
    }
}

int bsearch(ll val, int i = 1, int L = 1, int R = Q + 1)
{
    if (L == R)
        return L;
    else
    {
        lazy[i * 2] += lazy[i];
        lazy[i * 2 + 1] += lazy[i];
        seg[i] += lazy[i];
        lazy[i] = 0;
        int mid = (L + R) / 2;
        if (seg[i * 2] + lazy[i * 2] >= val)
            return bsearch(val, i * 2, L, mid);
        else
            return bsearch(val, i * 2 + 1, mid + 1, R);
    }
}

signed main()
{
    ios::sync_with_stdio(0), cin.tie(0);
    cin >> N >> M >> Q;
    for (int i = 1; i <= Q; i++)
    {
        ll T, L, R, C, K;
        cin >> T >> L >> R;
        if (T == 1)
        {
            cin >> C >> K;
            t12(L, R, K);
            modifies.emplace_back(pair<int, pair<int, pll>>{L, {i, {C, K}}});
            modifies.emplace_back(pair<int, pair<int, pll>>{R + 1, {i, {-C, -K}}});
            color[i] = C;
            ans[i] = -1;
        }
        else if (T == 2)
        {
            cin >> K;
            t12(L, R, -K);
            ans[i] = -1;
        }
        else
        {
            pll cur = query(L);
            cur.F -= qt2(L);
            if (cur.S < R)
                ans[i] = 0;
            else
                queries.emplace_back(pair<int, pll>{L, {i, R + cur.F}});
        }
    }
    sort(modifies.begin(), modifies.end());
    sort(queries.begin(), queries.end());
    int mdx = 0, qdx = 0;
    for (int i = 1; i <= N; i++)
    {

        while (mdx < modifies.size() && modifies[mdx].F == i)
        {
            modify(modifies[mdx].S.F, Q + 1, modifies[mdx].S.S.S);
            mdx++;
        }
        while (qdx < queries.size() && queries[qdx].F == i)
        {
            int t = bsearch(queries[qdx].S.S);
            if (t > queries[qdx].S.F)
                ans[queries[qdx].S.F] = 0;
            else
                ans[queries[qdx].S.F] = color[t];
            qdx++;
        }
    }
    for (int i = 1; i <= Q; i++)
        if (ans[i] >= 0)
            cout << ans[i] << '\n';
}

/*
3 4 7
3 1 1000000000
1 1 3 1 5000000000
1 1 2 4 5000000000
3 2 5000000001
1 1 3 3 5000000000
3 3 10000000000
3 1 15000000000

4

*/

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:165:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, std::pair<int, std::pair<long long int, long long int> > > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  165 |         while (mdx < modifies.size() && modifies[mdx].F == i)
      |                ~~~~^~~~~~~~~~~~~~~~~
foodcourt.cpp:170:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, std::pair<long long int, long long int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  170 |         while (qdx < queries.size() && queries[qdx].F == i)
      |                ~~~~^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 596 KB Output is correct
3 Correct 2 ms 660 KB Output is correct
4 Correct 3 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 3 ms 632 KB Output is correct
8 Correct 3 ms 596 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 3 ms 596 KB Output is correct
11 Correct 3 ms 596 KB Output is correct
12 Correct 3 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 600 KB Output is correct
19 Correct 3 ms 712 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 596 KB Output is correct
3 Correct 2 ms 660 KB Output is correct
4 Correct 3 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 3 ms 632 KB Output is correct
8 Correct 3 ms 596 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 3 ms 596 KB Output is correct
11 Correct 3 ms 596 KB Output is correct
12 Correct 3 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 600 KB Output is correct
19 Correct 3 ms 712 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 596 KB Output is correct
22 Correct 3 ms 596 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 560 KB Output is correct
27 Correct 3 ms 596 KB Output is correct
28 Correct 3 ms 604 KB Output is correct
29 Correct 3 ms 596 KB Output is correct
30 Correct 3 ms 596 KB Output is correct
31 Correct 3 ms 596 KB Output is correct
32 Correct 3 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 3 ms 596 KB Output is correct
36 Correct 3 ms 596 KB Output is correct
37 Correct 2 ms 724 KB Output is correct
38 Correct 3 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 75 ms 8684 KB Output is correct
2 Correct 83 ms 9404 KB Output is correct
3 Correct 78 ms 8648 KB Output is correct
4 Correct 73 ms 8652 KB Output is correct
5 Correct 80 ms 9428 KB Output is correct
6 Correct 77 ms 9432 KB Output is correct
7 Correct 25 ms 5236 KB Output is correct
8 Correct 28 ms 5248 KB Output is correct
9 Correct 74 ms 8192 KB Output is correct
10 Correct 72 ms 8812 KB Output is correct
11 Correct 73 ms 8644 KB Output is correct
12 Correct 76 ms 8860 KB Output is correct
13 Correct 68 ms 9172 KB Output is correct
14 Correct 82 ms 9988 KB Output is correct
15 Correct 87 ms 10776 KB Output is correct
16 Correct 90 ms 10760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 442 ms 33816 KB Output is correct
2 Correct 317 ms 31268 KB Output is correct
3 Correct 446 ms 33796 KB Output is correct
4 Correct 336 ms 30552 KB Output is correct
5 Correct 329 ms 31608 KB Output is correct
6 Correct 467 ms 35932 KB Output is correct
7 Correct 117 ms 21772 KB Output is correct
8 Correct 137 ms 21888 KB Output is correct
9 Correct 423 ms 36736 KB Output is correct
10 Correct 462 ms 36848 KB Output is correct
11 Correct 434 ms 29108 KB Output is correct
12 Correct 472 ms 33012 KB Output is correct
13 Correct 454 ms 27588 KB Output is correct
14 Correct 443 ms 36828 KB Output is correct
15 Correct 443 ms 37340 KB Output is correct
16 Correct 444 ms 37168 KB Output is correct
17 Correct 457 ms 37204 KB Output is correct
18 Correct 456 ms 35344 KB Output is correct
19 Correct 466 ms 37328 KB Output is correct
20 Correct 443 ms 35740 KB Output is correct
21 Correct 450 ms 37188 KB Output is correct
22 Correct 468 ms 37240 KB Output is correct
23 Correct 462 ms 37236 KB Output is correct
24 Correct 478 ms 37244 KB Output is correct
25 Correct 388 ms 32456 KB Output is correct
26 Correct 386 ms 32752 KB Output is correct
27 Correct 392 ms 40264 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 596 KB Output is correct
3 Correct 2 ms 660 KB Output is correct
4 Correct 3 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 3 ms 632 KB Output is correct
8 Correct 3 ms 596 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 3 ms 596 KB Output is correct
11 Correct 3 ms 596 KB Output is correct
12 Correct 3 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 600 KB Output is correct
19 Correct 3 ms 712 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 75 ms 8684 KB Output is correct
22 Correct 83 ms 9404 KB Output is correct
23 Correct 78 ms 8648 KB Output is correct
24 Correct 73 ms 8652 KB Output is correct
25 Correct 80 ms 9428 KB Output is correct
26 Correct 77 ms 9432 KB Output is correct
27 Correct 25 ms 5236 KB Output is correct
28 Correct 28 ms 5248 KB Output is correct
29 Correct 74 ms 8192 KB Output is correct
30 Correct 72 ms 8812 KB Output is correct
31 Correct 73 ms 8644 KB Output is correct
32 Correct 76 ms 8860 KB Output is correct
33 Correct 68 ms 9172 KB Output is correct
34 Correct 82 ms 9988 KB Output is correct
35 Correct 87 ms 10776 KB Output is correct
36 Correct 90 ms 10760 KB Output is correct
37 Correct 79 ms 8720 KB Output is correct
38 Correct 75 ms 8920 KB Output is correct
39 Correct 24 ms 5112 KB Output is correct
40 Correct 28 ms 5528 KB Output is correct
41 Correct 83 ms 8108 KB Output is correct
42 Correct 90 ms 9220 KB Output is correct
43 Correct 88 ms 9200 KB Output is correct
44 Correct 93 ms 8808 KB Output is correct
45 Correct 84 ms 9296 KB Output is correct
46 Correct 86 ms 9328 KB Output is correct
47 Correct 48 ms 8092 KB Output is correct
48 Correct 84 ms 8188 KB Output is correct
49 Correct 62 ms 7880 KB Output is correct
50 Correct 83 ms 8456 KB Output is correct
51 Correct 86 ms 9332 KB Output is correct
52 Correct 90 ms 9260 KB Output is correct
53 Correct 69 ms 9620 KB Output is correct
54 Correct 87 ms 10796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 83 ms 9100 KB Output is correct
2 Correct 85 ms 9468 KB Output is correct
3 Correct 87 ms 9532 KB Output is correct
4 Correct 63 ms 7504 KB Output is correct
5 Correct 77 ms 8736 KB Output is correct
6 Correct 88 ms 9640 KB Output is correct
7 Correct 35 ms 7076 KB Output is correct
8 Correct 36 ms 6840 KB Output is correct
9 Correct 58 ms 9436 KB Output is correct
10 Correct 62 ms 7492 KB Output is correct
11 Correct 86 ms 9616 KB Output is correct
12 Correct 86 ms 9436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 596 KB Output is correct
3 Correct 2 ms 660 KB Output is correct
4 Correct 3 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 3 ms 632 KB Output is correct
8 Correct 3 ms 596 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 3 ms 596 KB Output is correct
11 Correct 3 ms 596 KB Output is correct
12 Correct 3 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 600 KB Output is correct
19 Correct 3 ms 712 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 596 KB Output is correct
22 Correct 3 ms 596 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 560 KB Output is correct
27 Correct 3 ms 596 KB Output is correct
28 Correct 3 ms 604 KB Output is correct
29 Correct 3 ms 596 KB Output is correct
30 Correct 3 ms 596 KB Output is correct
31 Correct 3 ms 596 KB Output is correct
32 Correct 3 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 3 ms 596 KB Output is correct
36 Correct 3 ms 596 KB Output is correct
37 Correct 2 ms 724 KB Output is correct
38 Correct 3 ms 724 KB Output is correct
39 Correct 75 ms 8684 KB Output is correct
40 Correct 83 ms 9404 KB Output is correct
41 Correct 78 ms 8648 KB Output is correct
42 Correct 73 ms 8652 KB Output is correct
43 Correct 80 ms 9428 KB Output is correct
44 Correct 77 ms 9432 KB Output is correct
45 Correct 25 ms 5236 KB Output is correct
46 Correct 28 ms 5248 KB Output is correct
47 Correct 74 ms 8192 KB Output is correct
48 Correct 72 ms 8812 KB Output is correct
49 Correct 73 ms 8644 KB Output is correct
50 Correct 76 ms 8860 KB Output is correct
51 Correct 68 ms 9172 KB Output is correct
52 Correct 82 ms 9988 KB Output is correct
53 Correct 87 ms 10776 KB Output is correct
54 Correct 90 ms 10760 KB Output is correct
55 Correct 79 ms 8720 KB Output is correct
56 Correct 75 ms 8920 KB Output is correct
57 Correct 24 ms 5112 KB Output is correct
58 Correct 28 ms 5528 KB Output is correct
59 Correct 83 ms 8108 KB Output is correct
60 Correct 90 ms 9220 KB Output is correct
61 Correct 88 ms 9200 KB Output is correct
62 Correct 93 ms 8808 KB Output is correct
63 Correct 84 ms 9296 KB Output is correct
64 Correct 86 ms 9328 KB Output is correct
65 Correct 48 ms 8092 KB Output is correct
66 Correct 84 ms 8188 KB Output is correct
67 Correct 62 ms 7880 KB Output is correct
68 Correct 83 ms 8456 KB Output is correct
69 Correct 86 ms 9332 KB Output is correct
70 Correct 90 ms 9260 KB Output is correct
71 Correct 69 ms 9620 KB Output is correct
72 Correct 87 ms 10796 KB Output is correct
73 Correct 83 ms 9100 KB Output is correct
74 Correct 85 ms 9468 KB Output is correct
75 Correct 87 ms 9532 KB Output is correct
76 Correct 63 ms 7504 KB Output is correct
77 Correct 77 ms 8736 KB Output is correct
78 Correct 88 ms 9640 KB Output is correct
79 Correct 35 ms 7076 KB Output is correct
80 Correct 36 ms 6840 KB Output is correct
81 Correct 58 ms 9436 KB Output is correct
82 Correct 62 ms 7492 KB Output is correct
83 Correct 86 ms 9616 KB Output is correct
84 Correct 86 ms 9436 KB Output is correct
85 Correct 85 ms 9324 KB Output is correct
86 Correct 94 ms 9668 KB Output is correct
87 Correct 92 ms 9308 KB Output is correct
88 Correct 98 ms 10080 KB Output is correct
89 Correct 57 ms 7116 KB Output is correct
90 Correct 88 ms 9620 KB Output is correct
91 Correct 74 ms 8968 KB Output is correct
92 Correct 76 ms 8948 KB Output is correct
93 Correct 95 ms 9840 KB Output is correct
94 Correct 90 ms 9332 KB Output is correct
95 Correct 91 ms 9712 KB Output is correct
96 Correct 95 ms 9748 KB Output is correct
97 Correct 98 ms 9824 KB Output is correct
98 Correct 79 ms 9072 KB Output is correct
99 Correct 49 ms 8592 KB Output is correct
100 Correct 71 ms 7976 KB Output is correct
101 Correct 84 ms 8680 KB Output is correct
102 Correct 85 ms 10680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 3 ms 596 KB Output is correct
3 Correct 2 ms 660 KB Output is correct
4 Correct 3 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 3 ms 632 KB Output is correct
8 Correct 3 ms 596 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 3 ms 596 KB Output is correct
11 Correct 3 ms 596 KB Output is correct
12 Correct 3 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 600 KB Output is correct
19 Correct 3 ms 712 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 596 KB Output is correct
22 Correct 3 ms 596 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 560 KB Output is correct
27 Correct 3 ms 596 KB Output is correct
28 Correct 3 ms 604 KB Output is correct
29 Correct 3 ms 596 KB Output is correct
30 Correct 3 ms 596 KB Output is correct
31 Correct 3 ms 596 KB Output is correct
32 Correct 3 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 3 ms 596 KB Output is correct
36 Correct 3 ms 596 KB Output is correct
37 Correct 2 ms 724 KB Output is correct
38 Correct 3 ms 724 KB Output is correct
39 Correct 75 ms 8684 KB Output is correct
40 Correct 83 ms 9404 KB Output is correct
41 Correct 78 ms 8648 KB Output is correct
42 Correct 73 ms 8652 KB Output is correct
43 Correct 80 ms 9428 KB Output is correct
44 Correct 77 ms 9432 KB Output is correct
45 Correct 25 ms 5236 KB Output is correct
46 Correct 28 ms 5248 KB Output is correct
47 Correct 74 ms 8192 KB Output is correct
48 Correct 72 ms 8812 KB Output is correct
49 Correct 73 ms 8644 KB Output is correct
50 Correct 76 ms 8860 KB Output is correct
51 Correct 68 ms 9172 KB Output is correct
52 Correct 82 ms 9988 KB Output is correct
53 Correct 87 ms 10776 KB Output is correct
54 Correct 90 ms 10760 KB Output is correct
55 Correct 442 ms 33816 KB Output is correct
56 Correct 317 ms 31268 KB Output is correct
57 Correct 446 ms 33796 KB Output is correct
58 Correct 336 ms 30552 KB Output is correct
59 Correct 329 ms 31608 KB Output is correct
60 Correct 467 ms 35932 KB Output is correct
61 Correct 117 ms 21772 KB Output is correct
62 Correct 137 ms 21888 KB Output is correct
63 Correct 423 ms 36736 KB Output is correct
64 Correct 462 ms 36848 KB Output is correct
65 Correct 434 ms 29108 KB Output is correct
66 Correct 472 ms 33012 KB Output is correct
67 Correct 454 ms 27588 KB Output is correct
68 Correct 443 ms 36828 KB Output is correct
69 Correct 443 ms 37340 KB Output is correct
70 Correct 444 ms 37168 KB Output is correct
71 Correct 457 ms 37204 KB Output is correct
72 Correct 456 ms 35344 KB Output is correct
73 Correct 466 ms 37328 KB Output is correct
74 Correct 443 ms 35740 KB Output is correct
75 Correct 450 ms 37188 KB Output is correct
76 Correct 468 ms 37240 KB Output is correct
77 Correct 462 ms 37236 KB Output is correct
78 Correct 478 ms 37244 KB Output is correct
79 Correct 388 ms 32456 KB Output is correct
80 Correct 386 ms 32752 KB Output is correct
81 Correct 392 ms 40264 KB Output is correct
82 Correct 79 ms 8720 KB Output is correct
83 Correct 75 ms 8920 KB Output is correct
84 Correct 24 ms 5112 KB Output is correct
85 Correct 28 ms 5528 KB Output is correct
86 Correct 83 ms 8108 KB Output is correct
87 Correct 90 ms 9220 KB Output is correct
88 Correct 88 ms 9200 KB Output is correct
89 Correct 93 ms 8808 KB Output is correct
90 Correct 84 ms 9296 KB Output is correct
91 Correct 86 ms 9328 KB Output is correct
92 Correct 48 ms 8092 KB Output is correct
93 Correct 84 ms 8188 KB Output is correct
94 Correct 62 ms 7880 KB Output is correct
95 Correct 83 ms 8456 KB Output is correct
96 Correct 86 ms 9332 KB Output is correct
97 Correct 90 ms 9260 KB Output is correct
98 Correct 69 ms 9620 KB Output is correct
99 Correct 87 ms 10796 KB Output is correct
100 Correct 83 ms 9100 KB Output is correct
101 Correct 85 ms 9468 KB Output is correct
102 Correct 87 ms 9532 KB Output is correct
103 Correct 63 ms 7504 KB Output is correct
104 Correct 77 ms 8736 KB Output is correct
105 Correct 88 ms 9640 KB Output is correct
106 Correct 35 ms 7076 KB Output is correct
107 Correct 36 ms 6840 KB Output is correct
108 Correct 58 ms 9436 KB Output is correct
109 Correct 62 ms 7492 KB Output is correct
110 Correct 86 ms 9616 KB Output is correct
111 Correct 86 ms 9436 KB Output is correct
112 Correct 85 ms 9324 KB Output is correct
113 Correct 94 ms 9668 KB Output is correct
114 Correct 92 ms 9308 KB Output is correct
115 Correct 98 ms 10080 KB Output is correct
116 Correct 57 ms 7116 KB Output is correct
117 Correct 88 ms 9620 KB Output is correct
118 Correct 74 ms 8968 KB Output is correct
119 Correct 76 ms 8948 KB Output is correct
120 Correct 95 ms 9840 KB Output is correct
121 Correct 90 ms 9332 KB Output is correct
122 Correct 91 ms 9712 KB Output is correct
123 Correct 95 ms 9748 KB Output is correct
124 Correct 98 ms 9824 KB Output is correct
125 Correct 79 ms 9072 KB Output is correct
126 Correct 49 ms 8592 KB Output is correct
127 Correct 71 ms 7976 KB Output is correct
128 Correct 84 ms 8680 KB Output is correct
129 Correct 85 ms 10680 KB Output is correct
130 Correct 468 ms 37516 KB Output is correct
131 Correct 324 ms 32776 KB Output is correct
132 Correct 443 ms 37468 KB Output is correct
133 Correct 464 ms 37600 KB Output is correct
134 Correct 416 ms 35092 KB Output is correct
135 Correct 496 ms 38836 KB Output is correct
136 Correct 445 ms 40716 KB Output is correct
137 Correct 440 ms 40668 KB Output is correct
138 Correct 425 ms 32712 KB Output is correct
139 Correct 462 ms 36872 KB Output is correct
140 Correct 474 ms 34996 KB Output is correct
141 Correct 452 ms 37452 KB Output is correct
142 Correct 456 ms 37856 KB Output is correct
143 Correct 465 ms 37764 KB Output is correct
144 Correct 438 ms 35944 KB Output is correct
145 Correct 458 ms 38000 KB Output is correct
146 Correct 456 ms 36788 KB Output is correct
147 Correct 451 ms 37828 KB Output is correct
148 Correct 469 ms 37784 KB Output is correct
149 Correct 461 ms 37864 KB Output is correct
150 Correct 219 ms 32780 KB Output is correct
151 Correct 377 ms 33240 KB Output is correct
152 Correct 391 ms 33272 KB Output is correct
153 Correct 379 ms 41220 KB Output is correct