답안 #852668

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
852668 2023-09-22T12:44:34 Z danikoynov 푸드 코트 (JOI21_foodcourt) C++14
100 / 100
372 ms 57232 KB
/**
 ____ ____ ____ ____ ____ ____
||l |||e |||i |||n |||a |||d ||
||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|

**/

#include<bits/stdc++.h>
#define endl '\n'

using namespace std;
typedef long long ll;

void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll maxn = 250010;
const ll inf = 1e18;

struct segment_tree
{
    ll tree[4 * maxn];
    pair < ll, ll > lazy[4 * maxn];

    pair < ll, ll > merge_lazy(pair < ll, ll > a, pair < ll, ll > b)
    {
        ll c = min(a.second, b.first);
        a.second -= c;
        b.first -= c;
        a.first += b.first;
        a.second += b.second;
        return a;
    }

    void push_lazy(ll root, ll left, ll right)
    {

        tree[root] -= lazy[root].first;
        tree[root] = max(tree[root], (ll)(0));
        tree[root] += lazy[root].second;

        if (left != right)
        {
            lazy[root * 2] = merge_lazy(lazy[root * 2], lazy[root]);
            lazy[root * 2 + 1] = merge_lazy(lazy[root * 2 + 1], lazy[root]);
        }

        lazy[root] = {0, 0};
    }


    void update(ll root, ll left, ll right, ll qleft, ll qright, pair < ll, ll > cur)
    {

        push_lazy(root, left, right);

        if (left > qright || right < qleft)
            return;

        if (left >= qleft && right <= qright)
        {
            lazy[root] = cur;
            push_lazy(root, left, right);
            return;
        }

        ll mid = (left + right) / 2;
        update(root * 2, left, mid, qleft, qright, cur);
        update(root * 2 + 1, mid + 1, right, qleft, qright, cur);

        tree[root] = min(tree[root * 2], tree[root * 2 + 1]);


    }

    ll query(ll root, ll left, ll right, int pos)
    {

        push_lazy(root, left, right);

        if (left == right)
            return tree[root];

        int mid = (left + right) / 2;
        if (pos <= mid)
            return query(root * 2, left, mid, pos);
            return query(root * 2 + 1, mid + 1, right, pos);
    }

};
ll readInt()
{
    bool minus = false;
    ll result = 0;
    char ch;
    ch = getchar();
    while (true)
    {
        if (ch == '-') break;
        if (ch >= '0' && ch <= '9') break;
        ch = getchar();
    }
    if (ch == '-') minus = true;
    else result = ch-'0';
    while (true)
    {
        ch = getchar();
        if (ch < '0' || ch > '9') break;
        result = result*10 + (ch - '0');
    }
    if (minus)
        return -result;
    else
        return result;
}


long long read_int()
{
    char r;
    bool start=false,neg=false;
    long long ret=0;
    while(true)
    {
        r=getchar();
        if((r-'0'<0 || r-'0'>9) && r!='-' && !start)
        {
            continue;
        }
        if((r-'0'<0 || r-'0'>9) && r!='-' && start)
        {
            break;
        }
        if(start)ret*=10;
        start=true;
        if(r=='-')neg=true;
        else ret+=r-'0';
    }
    if(!neg)
        return ret;
    else
        return -ret;
}

ll n, m, q;
void input()
{
    n = readInt();
    m = readInt();
    q = readInt();
    //cin >> n >> m >> q;
}

struct task
{
    ll idx;
    ll  pos;

    task(ll _idx = 0, ll _pos = 0)
    {
        idx = _idx;

        pos = _pos;
    }
};

struct bit
{
    ll fen[maxn];

    void update(ll pos, ll val)
    {
        for (ll i = pos; i < maxn; i += (i & -i))
            fen[i] += val;
    }

    ll query(ll pos)
    {
        ll sum = 0;
        for (ll i = pos; i > 0; i -= (i & -i))
            sum += fen[i];
        return sum;
    }

    void range_update(ll l, ll r, ll v)
    {
        update(l, v);
        update(r + 1, - v);
    }

    ll find_kth(ll to)
    {
        ll pos = 0;
        ll sum = 0;
        for (ll bit = 20; bit >= 0; bit --)
        {
            if (pos + (1 << bit) > maxn)
                continue;
            ll new_sum = sum + fen[pos + (1 << bit)];
            if (new_sum < to)
            {
                pos = pos + (1 << bit);
                sum = new_sum;
            }
        }
        return pos + 1;
    }
};

vector < task > ask[maxn];
segment_tree line_tree;
bit pass_tree;
ll ans[maxn];


pair < int, ll > add[maxn];
vector < ll > upd[maxn];
ll query_cnt = 0;

void simulate()
{

    ll t, l, r, c, a; /// careful overflow
    ll k, b;

    ll cnt = 0;
    ll last = 0;
    for (ll i = 1; i <= q; i ++)
    {

        t = readInt();
        if (t == 1)
        {
            ///cin >> l >> r >> c >> k;
            l = readInt();
            r = readInt();
            c = readInt();
            k = read_int();
            line_tree.update(1, 1, n, l, r, {0, k});
            pass_tree.range_update(l, r, k);
            add[i] = {c, k};
            upd[l].push_back(i);
            upd[r + 1].push_back(-i);
        }
        else if (t == 2)
        {
            ///cin >> l >> r >> k;
            l = readInt();
            r = readInt();
            k = read_int();

            line_tree.update(1, 1, n, l, r, {k, 0});




        }
        else
        {
            ///cin >> a >> b;
            a = readInt();
            b = read_int();
            query_cnt ++;
            ll act = line_tree.query(1, 1, n, a);
            if (act < b)
            {
                ans[query_cnt] = 0;
            }
            else
            {
                ///cout << "here " << query_cnt << " " << pass_tree.query(a) << " " << act << endl;
                ask[a].push_back(task(query_cnt, pass_tree.query(a) - act + b));
            }
        }
    }


}

bit active;
void answer_tasks()
{

    for (ll i = 1; i <= n; i ++)
    {
        for (ll cur : upd[i])
        {
            if (cur > 0)
            {
                active.update(cur, add[cur].second);
            }
            else
            {
                active.update(-cur, - add[-cur].second);
            }
        }

        for (task cur : ask[i])
        {
            ans[cur.idx] = add[active.find_kth(cur.pos)].first;
            ///cout << cur.idx << " : " << cur.shop << " " << cur.pos << endl;
        }
    }
    for (ll i = 1; i <= query_cnt; i ++)
    {
        cout << ans[i] << endl;
    }
}

void solve()
{
    input();
    simulate();
    answer_tasks();
}

int main()
{
    ///freopen("test.txt", "r", stdin);
    speed();
    solve();
    return 0;
}

Compilation message

foodcourt.cpp: In member function 'll segment_tree::query(ll, ll, ll, int)':
foodcourt.cpp:90:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   90 |         if (pos <= mid)
      |         ^~
foodcourt.cpp:92:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   92 |             return query(root * 2 + 1, mid + 1, right, pos);
      |             ^~~~~~
foodcourt.cpp: In function 'void simulate()':
foodcourt.cpp:231:8: warning: unused variable 'cnt' [-Wunused-variable]
  231 |     ll cnt = 0;
      |        ^~~
foodcourt.cpp:232:8: warning: unused variable 'last' [-Wunused-variable]
  232 |     ll last = 0;
      |        ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 34904 KB Output is correct
2 Correct 6 ms 34904 KB Output is correct
3 Correct 6 ms 34904 KB Output is correct
4 Correct 7 ms 35164 KB Output is correct
5 Correct 6 ms 34908 KB Output is correct
6 Correct 6 ms 34908 KB Output is correct
7 Correct 7 ms 34904 KB Output is correct
8 Correct 7 ms 34904 KB Output is correct
9 Correct 6 ms 35160 KB Output is correct
10 Correct 6 ms 34904 KB Output is correct
11 Correct 7 ms 34904 KB Output is correct
12 Correct 6 ms 34908 KB Output is correct
13 Correct 6 ms 34904 KB Output is correct
14 Correct 6 ms 35160 KB Output is correct
15 Correct 7 ms 34904 KB Output is correct
16 Correct 6 ms 34904 KB Output is correct
17 Correct 7 ms 34904 KB Output is correct
18 Correct 8 ms 34904 KB Output is correct
19 Correct 8 ms 35168 KB Output is correct
20 Correct 7 ms 35164 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 34904 KB Output is correct
2 Correct 6 ms 34904 KB Output is correct
3 Correct 6 ms 34904 KB Output is correct
4 Correct 7 ms 35164 KB Output is correct
5 Correct 6 ms 34908 KB Output is correct
6 Correct 6 ms 34908 KB Output is correct
7 Correct 7 ms 34904 KB Output is correct
8 Correct 7 ms 34904 KB Output is correct
9 Correct 6 ms 35160 KB Output is correct
10 Correct 6 ms 34904 KB Output is correct
11 Correct 7 ms 34904 KB Output is correct
12 Correct 6 ms 34908 KB Output is correct
13 Correct 6 ms 34904 KB Output is correct
14 Correct 6 ms 35160 KB Output is correct
15 Correct 7 ms 34904 KB Output is correct
16 Correct 6 ms 34904 KB Output is correct
17 Correct 7 ms 34904 KB Output is correct
18 Correct 8 ms 34904 KB Output is correct
19 Correct 8 ms 35168 KB Output is correct
20 Correct 7 ms 35164 KB Output is correct
21 Correct 7 ms 34904 KB Output is correct
22 Correct 7 ms 35032 KB Output is correct
23 Correct 8 ms 35416 KB Output is correct
24 Correct 7 ms 35164 KB Output is correct
25 Correct 6 ms 34904 KB Output is correct
26 Correct 8 ms 34904 KB Output is correct
27 Correct 7 ms 35160 KB Output is correct
28 Correct 7 ms 35160 KB Output is correct
29 Correct 7 ms 35160 KB Output is correct
30 Correct 7 ms 35160 KB Output is correct
31 Correct 7 ms 35160 KB Output is correct
32 Correct 7 ms 35160 KB Output is correct
33 Correct 7 ms 35160 KB Output is correct
34 Correct 7 ms 35160 KB Output is correct
35 Correct 6 ms 35160 KB Output is correct
36 Correct 7 ms 35160 KB Output is correct
37 Correct 7 ms 35168 KB Output is correct
38 Correct 7 ms 35160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 39248 KB Output is correct
2 Correct 40 ms 39512 KB Output is correct
3 Correct 39 ms 39248 KB Output is correct
4 Correct 55 ms 39252 KB Output is correct
5 Correct 40 ms 39484 KB Output is correct
6 Correct 48 ms 39628 KB Output is correct
7 Correct 12 ms 37840 KB Output is correct
8 Correct 15 ms 37844 KB Output is correct
9 Correct 41 ms 39248 KB Output is correct
10 Correct 40 ms 39324 KB Output is correct
11 Correct 45 ms 39268 KB Output is correct
12 Correct 43 ms 39248 KB Output is correct
13 Correct 35 ms 39600 KB Output is correct
14 Correct 39 ms 39716 KB Output is correct
15 Correct 40 ms 40092 KB Output is correct
16 Correct 46 ms 40016 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 234 ms 47340 KB Output is correct
2 Correct 190 ms 48436 KB Output is correct
3 Correct 280 ms 51436 KB Output is correct
4 Correct 235 ms 50036 KB Output is correct
5 Correct 212 ms 49364 KB Output is correct
6 Correct 289 ms 52304 KB Output is correct
7 Correct 40 ms 41912 KB Output is correct
8 Correct 41 ms 42320 KB Output is correct
9 Correct 309 ms 53584 KB Output is correct
10 Correct 299 ms 53360 KB Output is correct
11 Correct 284 ms 51500 KB Output is correct
12 Correct 299 ms 51280 KB Output is correct
13 Correct 274 ms 51308 KB Output is correct
14 Correct 264 ms 51280 KB Output is correct
15 Correct 294 ms 51152 KB Output is correct
16 Correct 286 ms 51280 KB Output is correct
17 Correct 287 ms 51264 KB Output is correct
18 Correct 280 ms 51296 KB Output is correct
19 Correct 274 ms 51280 KB Output is correct
20 Correct 276 ms 51252 KB Output is correct
21 Correct 287 ms 51468 KB Output is correct
22 Correct 335 ms 51308 KB Output is correct
23 Correct 280 ms 51300 KB Output is correct
24 Correct 271 ms 51388 KB Output is correct
25 Correct 212 ms 48208 KB Output is correct
26 Correct 203 ms 48468 KB Output is correct
27 Correct 215 ms 52908 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 34904 KB Output is correct
2 Correct 6 ms 34904 KB Output is correct
3 Correct 6 ms 34904 KB Output is correct
4 Correct 7 ms 35164 KB Output is correct
5 Correct 6 ms 34908 KB Output is correct
6 Correct 6 ms 34908 KB Output is correct
7 Correct 7 ms 34904 KB Output is correct
8 Correct 7 ms 34904 KB Output is correct
9 Correct 6 ms 35160 KB Output is correct
10 Correct 6 ms 34904 KB Output is correct
11 Correct 7 ms 34904 KB Output is correct
12 Correct 6 ms 34908 KB Output is correct
13 Correct 6 ms 34904 KB Output is correct
14 Correct 6 ms 35160 KB Output is correct
15 Correct 7 ms 34904 KB Output is correct
16 Correct 6 ms 34904 KB Output is correct
17 Correct 7 ms 34904 KB Output is correct
18 Correct 8 ms 34904 KB Output is correct
19 Correct 8 ms 35168 KB Output is correct
20 Correct 7 ms 35164 KB Output is correct
21 Correct 41 ms 39248 KB Output is correct
22 Correct 40 ms 39512 KB Output is correct
23 Correct 39 ms 39248 KB Output is correct
24 Correct 55 ms 39252 KB Output is correct
25 Correct 40 ms 39484 KB Output is correct
26 Correct 48 ms 39628 KB Output is correct
27 Correct 12 ms 37840 KB Output is correct
28 Correct 15 ms 37844 KB Output is correct
29 Correct 41 ms 39248 KB Output is correct
30 Correct 40 ms 39324 KB Output is correct
31 Correct 45 ms 39268 KB Output is correct
32 Correct 43 ms 39248 KB Output is correct
33 Correct 35 ms 39600 KB Output is correct
34 Correct 39 ms 39716 KB Output is correct
35 Correct 40 ms 40092 KB Output is correct
36 Correct 46 ms 40016 KB Output is correct
37 Correct 58 ms 39504 KB Output is correct
38 Correct 48 ms 39504 KB Output is correct
39 Correct 12 ms 37848 KB Output is correct
40 Correct 13 ms 37976 KB Output is correct
41 Correct 55 ms 37632 KB Output is correct
42 Correct 51 ms 39764 KB Output is correct
43 Correct 52 ms 39760 KB Output is correct
44 Correct 48 ms 39760 KB Output is correct
45 Correct 69 ms 39708 KB Output is correct
46 Correct 51 ms 39756 KB Output is correct
47 Correct 20 ms 38996 KB Output is correct
48 Correct 44 ms 39248 KB Output is correct
49 Correct 43 ms 39248 KB Output is correct
50 Correct 45 ms 39436 KB Output is correct
51 Correct 61 ms 39760 KB Output is correct
52 Correct 54 ms 39720 KB Output is correct
53 Correct 37 ms 39760 KB Output is correct
54 Correct 44 ms 40016 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 45 ms 40220 KB Output is correct
2 Correct 53 ms 41296 KB Output is correct
3 Correct 57 ms 41296 KB Output is correct
4 Correct 39 ms 40484 KB Output is correct
5 Correct 47 ms 41040 KB Output is correct
6 Correct 58 ms 41220 KB Output is correct
7 Correct 17 ms 39072 KB Output is correct
8 Correct 22 ms 39000 KB Output is correct
9 Correct 27 ms 40520 KB Output is correct
10 Correct 33 ms 40016 KB Output is correct
11 Correct 56 ms 40668 KB Output is correct
12 Correct 45 ms 40676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 34904 KB Output is correct
2 Correct 6 ms 34904 KB Output is correct
3 Correct 6 ms 34904 KB Output is correct
4 Correct 7 ms 35164 KB Output is correct
5 Correct 6 ms 34908 KB Output is correct
6 Correct 6 ms 34908 KB Output is correct
7 Correct 7 ms 34904 KB Output is correct
8 Correct 7 ms 34904 KB Output is correct
9 Correct 6 ms 35160 KB Output is correct
10 Correct 6 ms 34904 KB Output is correct
11 Correct 7 ms 34904 KB Output is correct
12 Correct 6 ms 34908 KB Output is correct
13 Correct 6 ms 34904 KB Output is correct
14 Correct 6 ms 35160 KB Output is correct
15 Correct 7 ms 34904 KB Output is correct
16 Correct 6 ms 34904 KB Output is correct
17 Correct 7 ms 34904 KB Output is correct
18 Correct 8 ms 34904 KB Output is correct
19 Correct 8 ms 35168 KB Output is correct
20 Correct 7 ms 35164 KB Output is correct
21 Correct 7 ms 34904 KB Output is correct
22 Correct 7 ms 35032 KB Output is correct
23 Correct 8 ms 35416 KB Output is correct
24 Correct 7 ms 35164 KB Output is correct
25 Correct 6 ms 34904 KB Output is correct
26 Correct 8 ms 34904 KB Output is correct
27 Correct 7 ms 35160 KB Output is correct
28 Correct 7 ms 35160 KB Output is correct
29 Correct 7 ms 35160 KB Output is correct
30 Correct 7 ms 35160 KB Output is correct
31 Correct 7 ms 35160 KB Output is correct
32 Correct 7 ms 35160 KB Output is correct
33 Correct 7 ms 35160 KB Output is correct
34 Correct 7 ms 35160 KB Output is correct
35 Correct 6 ms 35160 KB Output is correct
36 Correct 7 ms 35160 KB Output is correct
37 Correct 7 ms 35168 KB Output is correct
38 Correct 7 ms 35160 KB Output is correct
39 Correct 41 ms 39248 KB Output is correct
40 Correct 40 ms 39512 KB Output is correct
41 Correct 39 ms 39248 KB Output is correct
42 Correct 55 ms 39252 KB Output is correct
43 Correct 40 ms 39484 KB Output is correct
44 Correct 48 ms 39628 KB Output is correct
45 Correct 12 ms 37840 KB Output is correct
46 Correct 15 ms 37844 KB Output is correct
47 Correct 41 ms 39248 KB Output is correct
48 Correct 40 ms 39324 KB Output is correct
49 Correct 45 ms 39268 KB Output is correct
50 Correct 43 ms 39248 KB Output is correct
51 Correct 35 ms 39600 KB Output is correct
52 Correct 39 ms 39716 KB Output is correct
53 Correct 40 ms 40092 KB Output is correct
54 Correct 46 ms 40016 KB Output is correct
55 Correct 58 ms 39504 KB Output is correct
56 Correct 48 ms 39504 KB Output is correct
57 Correct 12 ms 37848 KB Output is correct
58 Correct 13 ms 37976 KB Output is correct
59 Correct 55 ms 37632 KB Output is correct
60 Correct 51 ms 39764 KB Output is correct
61 Correct 52 ms 39760 KB Output is correct
62 Correct 48 ms 39760 KB Output is correct
63 Correct 69 ms 39708 KB Output is correct
64 Correct 51 ms 39756 KB Output is correct
65 Correct 20 ms 38996 KB Output is correct
66 Correct 44 ms 39248 KB Output is correct
67 Correct 43 ms 39248 KB Output is correct
68 Correct 45 ms 39436 KB Output is correct
69 Correct 61 ms 39760 KB Output is correct
70 Correct 54 ms 39720 KB Output is correct
71 Correct 37 ms 39760 KB Output is correct
72 Correct 44 ms 40016 KB Output is correct
73 Correct 45 ms 40220 KB Output is correct
74 Correct 53 ms 41296 KB Output is correct
75 Correct 57 ms 41296 KB Output is correct
76 Correct 39 ms 40484 KB Output is correct
77 Correct 47 ms 41040 KB Output is correct
78 Correct 58 ms 41220 KB Output is correct
79 Correct 17 ms 39072 KB Output is correct
80 Correct 22 ms 39000 KB Output is correct
81 Correct 27 ms 40520 KB Output is correct
82 Correct 33 ms 40016 KB Output is correct
83 Correct 56 ms 40668 KB Output is correct
84 Correct 45 ms 40676 KB Output is correct
85 Correct 47 ms 40536 KB Output is correct
86 Correct 50 ms 40784 KB Output is correct
87 Correct 60 ms 40784 KB Output is correct
88 Correct 66 ms 40896 KB Output is correct
89 Correct 40 ms 37968 KB Output is correct
90 Correct 61 ms 40784 KB Output is correct
91 Correct 43 ms 40272 KB Output is correct
92 Correct 48 ms 40016 KB Output is correct
93 Correct 57 ms 40784 KB Output is correct
94 Correct 51 ms 40812 KB Output is correct
95 Correct 52 ms 40528 KB Output is correct
96 Correct 52 ms 40784 KB Output is correct
97 Correct 70 ms 40976 KB Output is correct
98 Correct 52 ms 40536 KB Output is correct
99 Correct 23 ms 40016 KB Output is correct
100 Correct 41 ms 39760 KB Output is correct
101 Correct 57 ms 40180 KB Output is correct
102 Correct 63 ms 40784 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 34904 KB Output is correct
2 Correct 6 ms 34904 KB Output is correct
3 Correct 6 ms 34904 KB Output is correct
4 Correct 7 ms 35164 KB Output is correct
5 Correct 6 ms 34908 KB Output is correct
6 Correct 6 ms 34908 KB Output is correct
7 Correct 7 ms 34904 KB Output is correct
8 Correct 7 ms 34904 KB Output is correct
9 Correct 6 ms 35160 KB Output is correct
10 Correct 6 ms 34904 KB Output is correct
11 Correct 7 ms 34904 KB Output is correct
12 Correct 6 ms 34908 KB Output is correct
13 Correct 6 ms 34904 KB Output is correct
14 Correct 6 ms 35160 KB Output is correct
15 Correct 7 ms 34904 KB Output is correct
16 Correct 6 ms 34904 KB Output is correct
17 Correct 7 ms 34904 KB Output is correct
18 Correct 8 ms 34904 KB Output is correct
19 Correct 8 ms 35168 KB Output is correct
20 Correct 7 ms 35164 KB Output is correct
21 Correct 7 ms 34904 KB Output is correct
22 Correct 7 ms 35032 KB Output is correct
23 Correct 8 ms 35416 KB Output is correct
24 Correct 7 ms 35164 KB Output is correct
25 Correct 6 ms 34904 KB Output is correct
26 Correct 8 ms 34904 KB Output is correct
27 Correct 7 ms 35160 KB Output is correct
28 Correct 7 ms 35160 KB Output is correct
29 Correct 7 ms 35160 KB Output is correct
30 Correct 7 ms 35160 KB Output is correct
31 Correct 7 ms 35160 KB Output is correct
32 Correct 7 ms 35160 KB Output is correct
33 Correct 7 ms 35160 KB Output is correct
34 Correct 7 ms 35160 KB Output is correct
35 Correct 6 ms 35160 KB Output is correct
36 Correct 7 ms 35160 KB Output is correct
37 Correct 7 ms 35168 KB Output is correct
38 Correct 7 ms 35160 KB Output is correct
39 Correct 41 ms 39248 KB Output is correct
40 Correct 40 ms 39512 KB Output is correct
41 Correct 39 ms 39248 KB Output is correct
42 Correct 55 ms 39252 KB Output is correct
43 Correct 40 ms 39484 KB Output is correct
44 Correct 48 ms 39628 KB Output is correct
45 Correct 12 ms 37840 KB Output is correct
46 Correct 15 ms 37844 KB Output is correct
47 Correct 41 ms 39248 KB Output is correct
48 Correct 40 ms 39324 KB Output is correct
49 Correct 45 ms 39268 KB Output is correct
50 Correct 43 ms 39248 KB Output is correct
51 Correct 35 ms 39600 KB Output is correct
52 Correct 39 ms 39716 KB Output is correct
53 Correct 40 ms 40092 KB Output is correct
54 Correct 46 ms 40016 KB Output is correct
55 Correct 234 ms 47340 KB Output is correct
56 Correct 190 ms 48436 KB Output is correct
57 Correct 280 ms 51436 KB Output is correct
58 Correct 235 ms 50036 KB Output is correct
59 Correct 212 ms 49364 KB Output is correct
60 Correct 289 ms 52304 KB Output is correct
61 Correct 40 ms 41912 KB Output is correct
62 Correct 41 ms 42320 KB Output is correct
63 Correct 309 ms 53584 KB Output is correct
64 Correct 299 ms 53360 KB Output is correct
65 Correct 284 ms 51500 KB Output is correct
66 Correct 299 ms 51280 KB Output is correct
67 Correct 274 ms 51308 KB Output is correct
68 Correct 264 ms 51280 KB Output is correct
69 Correct 294 ms 51152 KB Output is correct
70 Correct 286 ms 51280 KB Output is correct
71 Correct 287 ms 51264 KB Output is correct
72 Correct 280 ms 51296 KB Output is correct
73 Correct 274 ms 51280 KB Output is correct
74 Correct 276 ms 51252 KB Output is correct
75 Correct 287 ms 51468 KB Output is correct
76 Correct 335 ms 51308 KB Output is correct
77 Correct 280 ms 51300 KB Output is correct
78 Correct 271 ms 51388 KB Output is correct
79 Correct 212 ms 48208 KB Output is correct
80 Correct 203 ms 48468 KB Output is correct
81 Correct 215 ms 52908 KB Output is correct
82 Correct 58 ms 39504 KB Output is correct
83 Correct 48 ms 39504 KB Output is correct
84 Correct 12 ms 37848 KB Output is correct
85 Correct 13 ms 37976 KB Output is correct
86 Correct 55 ms 37632 KB Output is correct
87 Correct 51 ms 39764 KB Output is correct
88 Correct 52 ms 39760 KB Output is correct
89 Correct 48 ms 39760 KB Output is correct
90 Correct 69 ms 39708 KB Output is correct
91 Correct 51 ms 39756 KB Output is correct
92 Correct 20 ms 38996 KB Output is correct
93 Correct 44 ms 39248 KB Output is correct
94 Correct 43 ms 39248 KB Output is correct
95 Correct 45 ms 39436 KB Output is correct
96 Correct 61 ms 39760 KB Output is correct
97 Correct 54 ms 39720 KB Output is correct
98 Correct 37 ms 39760 KB Output is correct
99 Correct 44 ms 40016 KB Output is correct
100 Correct 45 ms 40220 KB Output is correct
101 Correct 53 ms 41296 KB Output is correct
102 Correct 57 ms 41296 KB Output is correct
103 Correct 39 ms 40484 KB Output is correct
104 Correct 47 ms 41040 KB Output is correct
105 Correct 58 ms 41220 KB Output is correct
106 Correct 17 ms 39072 KB Output is correct
107 Correct 22 ms 39000 KB Output is correct
108 Correct 27 ms 40520 KB Output is correct
109 Correct 33 ms 40016 KB Output is correct
110 Correct 56 ms 40668 KB Output is correct
111 Correct 45 ms 40676 KB Output is correct
112 Correct 47 ms 40536 KB Output is correct
113 Correct 50 ms 40784 KB Output is correct
114 Correct 60 ms 40784 KB Output is correct
115 Correct 66 ms 40896 KB Output is correct
116 Correct 40 ms 37968 KB Output is correct
117 Correct 61 ms 40784 KB Output is correct
118 Correct 43 ms 40272 KB Output is correct
119 Correct 48 ms 40016 KB Output is correct
120 Correct 57 ms 40784 KB Output is correct
121 Correct 51 ms 40812 KB Output is correct
122 Correct 52 ms 40528 KB Output is correct
123 Correct 52 ms 40784 KB Output is correct
124 Correct 70 ms 40976 KB Output is correct
125 Correct 52 ms 40536 KB Output is correct
126 Correct 23 ms 40016 KB Output is correct
127 Correct 41 ms 39760 KB Output is correct
128 Correct 57 ms 40180 KB Output is correct
129 Correct 63 ms 40784 KB Output is correct
130 Correct 369 ms 54520 KB Output is correct
131 Correct 211 ms 50768 KB Output is correct
132 Correct 327 ms 54564 KB Output is correct
133 Correct 372 ms 55516 KB Output is correct
134 Correct 311 ms 53876 KB Output is correct
135 Correct 346 ms 55820 KB Output is correct
136 Correct 321 ms 57188 KB Output is correct
137 Correct 312 ms 57232 KB Output is correct
138 Correct 293 ms 54608 KB Output is correct
139 Correct 278 ms 54864 KB Output is correct
140 Correct 255 ms 54608 KB Output is correct
141 Correct 278 ms 54624 KB Output is correct
142 Correct 269 ms 54644 KB Output is correct
143 Correct 262 ms 54748 KB Output is correct
144 Correct 310 ms 54608 KB Output is correct
145 Correct 256 ms 54684 KB Output is correct
146 Correct 308 ms 54864 KB Output is correct
147 Correct 284 ms 54488 KB Output is correct
148 Correct 283 ms 54584 KB Output is correct
149 Correct 294 ms 54608 KB Output is correct
150 Correct 91 ms 50400 KB Output is correct
151 Correct 252 ms 51536 KB Output is correct
152 Correct 203 ms 52280 KB Output is correct
153 Correct 195 ms 55636 KB Output is correct