답안 #503517

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
503517 2022-01-08T09:13:53 Z cig32 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
924 ms 115208 KB
#pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
#define int long long
 
const int MAXN = 2.5e5 + 10;
const int MOD = 1e9 + 7;
mt19937_64 rng((int)std::chrono::steady_clock::now().time_since_epoch().count());
int rnd(int x, int y) {
    int u = uniform_int_distribution<int>(x, y)(rng);
    return u;
}
int N, M, Q;
struct segtree_purq {
    //point update range query version 4
    //Supports:
    //Point update (add)
    //Range sum queries
    //prefix "maximum sum suffix" queries
    struct node {
        long long sum = 0;
        long long mss = 0; 
        long long idx;
    };
    vector<node> a;
    int stok;
    void bu(int l, int r, int idx) {
        if(l == r) {
            a[idx].idx = l;
            return;
        }
        int mid = (l + r) >> 1;
        bu(l, mid, 2*idx+1);
        bu(mid+1, r, 2*idx+2);
        a[idx].idx = a[2*idx+1].idx;
    }
    void u(int l, int r, int tar, int idx, long long val) {
        if(l == r) {
            a[idx].sum += val;
            a[idx].mss = max(0ll, a[idx].sum);
            a[idx].idx = (a[idx].sum >= 0 ? l : -1);
            return;
        }
        int mid = (l + r) >> 1;
        if(tar <= mid) u(l, mid, tar, 2*idx+1, val);
        else u(mid+1, r, tar, 2*idx+2, val);
        a[idx].sum = a[2*idx+1].sum + a[2*idx+2].sum;
        a[idx].mss = max(a[2*idx+2].mss, a[2*idx+1].mss + a[2*idx+2].sum);
        a[idx].idx = (a[2*idx+1].mss + a[2*idx+2].sum > a[2*idx+2].mss ?
                      a[2*idx+1].idx : a[2*idx+2].idx);
    }
    long long qu1(int l, int r, int constl, int constr, int idx) {
        if(l <= constl && constr <= r) return a[idx].sum;
        int mid = (constl + constr) >> 1;
        if(mid < l || r < constl) {
            return qu1(l, r, mid+1, constr, 2*idx+2);
        }
        else if(constr < l || r < mid+1) {
            return qu1(l, r, constl, mid, 2*idx+1);
        }
        else {
            return qu1(l, r, constl, mid, 2*idx+1) + qu1(l, r, mid+1, constr, 2*idx+2);
        }
    }
    pair<pair<long long, int>, long long> qu2(int r, int constl, int constr, int idx) {
        if(constr <= r) {
            return {{a[idx].mss, a[idx].idx}, a[idx].sum};
        }
        int mid = (constr + constl) >> 1;
        if(r < constl) return qu2(r, mid+1, constr, 2*idx+2);
        else if(r < mid+1) return qu2(r, constl, mid, 2*idx+1);
        else {
            pair<pair<long long, int>, long long> rel = qu2(r, constl, mid, 2*idx+1);
            pair<pair<long long, int>, long long> rer = qu2(r, mid+1, constr, 2*idx+2);
            pair<pair<long long, int>, long long> res;
            if(rer.second + rel.first.first > rer.first.first) {
                res.first.first = rer.second + rel.first.first;
                res.first.second = rel.first.second;
            }
            else {
                res.first.first = rer.first.first;
                res.first.second = rer.first.second;
            }
            res.second = rel.second + rer.second;
            return res;
        }
    }
    public:
    void resize(int k) {
        stok = k;
        a.resize(4*k + 10);
        bu(1, stok, 0);
    }
    void update(int i, long long v) {
        u(1, stok, i, 0, v);
    }
    long long query_sum(int l, int r) {
        return qu1(l, r, 1, stok, 0);
    }
    long long query_mss(int r) {
        return qu2(r, 1, stok, 0).first.first;
    }
    long long query_mss_index(int r) {
        return qu2(r, 1, stok, 0).first.second;
    }
};
struct qry {
    int t = 0, l = 0, r = 0, c = 0, k = 0, a = 0, b = 0;
};
void solve(int tc) {
    cin >> N >> M >> Q;
    segtree_purq st, pos, neg; // main, helper
    qry b[Q+1];
    vector<pair<int, int> > delta[N+2];
    vector<pair<int, int> > oh[N+1];
    for(int i=1; i<=Q; i++) {
        cin >> b[i].t;
        if(b[i].t == 1) cin >> b[i].l >> b[i].r >> b[i].c >> b[i].k;
        if(b[i].t == 2) cin >> b[i].l >> b[i].r >> b[i].k;
        if(b[i].t == 3) cin >> b[i].a >> b[i].b;
        if(b[i].t == 1) {
            delta[b[i].l].push_back({i, b[i].k});
            delta[b[i].r + 1].push_back({i, -b[i].k});
        }
        if(b[i].t == 2) {
            delta[b[i].l].push_back({i, -b[i].k});
            delta[b[i].r + 1].push_back({i, b[i].k});
        }
        if(b[i].t == 3) {
            oh[b[i].a].push_back({i, b[i].b});
        }
    }
    st.resize(Q);
    pos.resize(Q);
    neg.resize(Q);
    for(int i=1; i<=N; i++) {
        
        for(pair<int, int> x : delta[i]) {
            st.update(x.first, x.second);
            if(b[x.first].t == 1) {
                pos.update(x.first, x.second);
            }
            if(b[x.first].t == 2) {
                neg.update(x.first, -x.second);
            }
        }
        for(pair<int, int> x : oh[i]) {
            int tot = st.query_mss(x.first);
            int lb = st.query_mss_index(x.first);
            int rb = x.first;
            int stolb = lb; // for reference use
            if(tot == 0) {
                b[x.first].k = 0;
                continue;
            }
            if(lb > rb) {
                continue;
            }
//            assert(lb <= rb);
            int nsum = neg.query_sum(lb, rb);
            while(lb < rb) {
                int mid = (lb+rb) >> 1;
                int psum = pos.query_sum(stolb, mid);
                if(psum - nsum >= x.second) {
                    rb = mid;
                }
                else {
                    lb = mid+1;
                }
            }
            int psum = pos.query_sum(stolb, lb);
            if(psum - nsum >= x.second) {
                b[x.first].k = b[lb].c;
            }
        }
        
    }
    for(int i=1; i<=Q; i++) {
        if(b[i].t == 3) {
            cout << b[i].k << "\n";
        }
    }
}

int32_t main(){
    ios::sync_with_stdio(0); cin.tie(0);
    int t = 1; //cin >> t;
    for(int i=1; i<=t; i++) {
        solve(i);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 972 KB Output is correct
2 Correct 3 ms 1188 KB Output is correct
3 Correct 2 ms 840 KB Output is correct
4 Correct 3 ms 1100 KB Output is correct
5 Correct 2 ms 972 KB Output is correct
6 Correct 2 ms 972 KB Output is correct
7 Correct 3 ms 1100 KB Output is correct
8 Correct 3 ms 1100 KB Output is correct
9 Correct 3 ms 1100 KB Output is correct
10 Correct 3 ms 1100 KB Output is correct
11 Correct 3 ms 1216 KB Output is correct
12 Correct 3 ms 1100 KB Output is correct
13 Correct 2 ms 972 KB Output is correct
14 Correct 3 ms 1228 KB Output is correct
15 Correct 3 ms 972 KB Output is correct
16 Correct 3 ms 1228 KB Output is correct
17 Correct 2 ms 972 KB Output is correct
18 Correct 3 ms 1092 KB Output is correct
19 Correct 2 ms 1100 KB Output is correct
20 Correct 3 ms 1232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 972 KB Output is correct
2 Correct 3 ms 1188 KB Output is correct
3 Correct 2 ms 840 KB Output is correct
4 Correct 3 ms 1100 KB Output is correct
5 Correct 2 ms 972 KB Output is correct
6 Correct 2 ms 972 KB Output is correct
7 Correct 3 ms 1100 KB Output is correct
8 Correct 3 ms 1100 KB Output is correct
9 Correct 3 ms 1100 KB Output is correct
10 Correct 3 ms 1100 KB Output is correct
11 Correct 3 ms 1216 KB Output is correct
12 Correct 3 ms 1100 KB Output is correct
13 Correct 2 ms 972 KB Output is correct
14 Correct 3 ms 1228 KB Output is correct
15 Correct 3 ms 972 KB Output is correct
16 Correct 3 ms 1228 KB Output is correct
17 Correct 2 ms 972 KB Output is correct
18 Correct 3 ms 1092 KB Output is correct
19 Correct 2 ms 1100 KB Output is correct
20 Correct 3 ms 1232 KB Output is correct
21 Correct 3 ms 1104 KB Output is correct
22 Correct 3 ms 1228 KB Output is correct
23 Correct 3 ms 1100 KB Output is correct
24 Correct 3 ms 1228 KB Output is correct
25 Correct 2 ms 968 KB Output is correct
26 Correct 3 ms 968 KB Output is correct
27 Correct 3 ms 1100 KB Output is correct
28 Correct 3 ms 1228 KB Output is correct
29 Correct 3 ms 1228 KB Output is correct
30 Correct 3 ms 1220 KB Output is correct
31 Correct 3 ms 1228 KB Output is correct
32 Correct 3 ms 1220 KB Output is correct
33 Correct 2 ms 1100 KB Output is correct
34 Correct 3 ms 1228 KB Output is correct
35 Correct 3 ms 1092 KB Output is correct
36 Correct 3 ms 1228 KB Output is correct
37 Correct 2 ms 844 KB Output is correct
38 Correct 3 ms 1228 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 106 ms 29088 KB Output is correct
2 Correct 109 ms 29272 KB Output is correct
3 Correct 98 ms 29084 KB Output is correct
4 Correct 102 ms 29000 KB Output is correct
5 Correct 102 ms 29188 KB Output is correct
6 Correct 104 ms 29200 KB Output is correct
7 Correct 41 ms 23108 KB Output is correct
8 Correct 46 ms 23728 KB Output is correct
9 Correct 105 ms 29248 KB Output is correct
10 Correct 114 ms 29196 KB Output is correct
11 Correct 113 ms 29196 KB Output is correct
12 Correct 114 ms 29256 KB Output is correct
13 Correct 100 ms 25580 KB Output is correct
14 Correct 95 ms 29076 KB Output is correct
15 Correct 98 ms 28052 KB Output is correct
16 Correct 101 ms 29264 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 731 ms 99300 KB Output is correct
2 Correct 559 ms 80452 KB Output is correct
3 Correct 873 ms 108412 KB Output is correct
4 Correct 574 ms 82008 KB Output is correct
5 Correct 578 ms 80704 KB Output is correct
6 Correct 825 ms 108612 KB Output is correct
7 Correct 349 ms 94184 KB Output is correct
8 Correct 385 ms 93244 KB Output is correct
9 Correct 914 ms 107536 KB Output is correct
10 Correct 868 ms 107536 KB Output is correct
11 Correct 708 ms 108588 KB Output is correct
12 Correct 766 ms 108612 KB Output is correct
13 Correct 727 ms 108644 KB Output is correct
14 Correct 761 ms 108732 KB Output is correct
15 Correct 745 ms 108580 KB Output is correct
16 Correct 758 ms 108592 KB Output is correct
17 Correct 753 ms 108632 KB Output is correct
18 Correct 761 ms 108588 KB Output is correct
19 Correct 770 ms 108588 KB Output is correct
20 Correct 758 ms 108608 KB Output is correct
21 Correct 743 ms 108612 KB Output is correct
22 Correct 805 ms 108712 KB Output is correct
23 Correct 796 ms 108592 KB Output is correct
24 Correct 798 ms 108800 KB Output is correct
25 Correct 700 ms 104516 KB Output is correct
26 Correct 738 ms 108892 KB Output is correct
27 Correct 557 ms 109508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 972 KB Output is correct
2 Correct 3 ms 1188 KB Output is correct
3 Correct 2 ms 840 KB Output is correct
4 Correct 3 ms 1100 KB Output is correct
5 Correct 2 ms 972 KB Output is correct
6 Correct 2 ms 972 KB Output is correct
7 Correct 3 ms 1100 KB Output is correct
8 Correct 3 ms 1100 KB Output is correct
9 Correct 3 ms 1100 KB Output is correct
10 Correct 3 ms 1100 KB Output is correct
11 Correct 3 ms 1216 KB Output is correct
12 Correct 3 ms 1100 KB Output is correct
13 Correct 2 ms 972 KB Output is correct
14 Correct 3 ms 1228 KB Output is correct
15 Correct 3 ms 972 KB Output is correct
16 Correct 3 ms 1228 KB Output is correct
17 Correct 2 ms 972 KB Output is correct
18 Correct 3 ms 1092 KB Output is correct
19 Correct 2 ms 1100 KB Output is correct
20 Correct 3 ms 1232 KB Output is correct
21 Correct 106 ms 29088 KB Output is correct
22 Correct 109 ms 29272 KB Output is correct
23 Correct 98 ms 29084 KB Output is correct
24 Correct 102 ms 29000 KB Output is correct
25 Correct 102 ms 29188 KB Output is correct
26 Correct 104 ms 29200 KB Output is correct
27 Correct 41 ms 23108 KB Output is correct
28 Correct 46 ms 23728 KB Output is correct
29 Correct 105 ms 29248 KB Output is correct
30 Correct 114 ms 29196 KB Output is correct
31 Correct 113 ms 29196 KB Output is correct
32 Correct 114 ms 29256 KB Output is correct
33 Correct 100 ms 25580 KB Output is correct
34 Correct 95 ms 29076 KB Output is correct
35 Correct 98 ms 28052 KB Output is correct
36 Correct 101 ms 29264 KB Output is correct
37 Correct 146 ms 26212 KB Output is correct
38 Correct 122 ms 23648 KB Output is correct
39 Correct 59 ms 20468 KB Output is correct
40 Correct 70 ms 22992 KB Output is correct
41 Correct 142 ms 29304 KB Output is correct
42 Correct 160 ms 29176 KB Output is correct
43 Correct 145 ms 29252 KB Output is correct
44 Correct 151 ms 29252 KB Output is correct
45 Correct 160 ms 29176 KB Output is correct
46 Correct 144 ms 29180 KB Output is correct
47 Correct 105 ms 28184 KB Output is correct
48 Correct 132 ms 29192 KB Output is correct
49 Correct 94 ms 20812 KB Output is correct
50 Correct 115 ms 25348 KB Output is correct
51 Correct 139 ms 29280 KB Output is correct
52 Correct 131 ms 29232 KB Output is correct
53 Correct 92 ms 23484 KB Output is correct
54 Correct 114 ms 29212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 172 ms 26436 KB Output is correct
2 Correct 181 ms 28092 KB Output is correct
3 Correct 170 ms 28996 KB Output is correct
4 Correct 120 ms 21508 KB Output is correct
5 Correct 154 ms 25504 KB Output is correct
6 Correct 175 ms 29020 KB Output is correct
7 Correct 82 ms 22316 KB Output is correct
8 Correct 95 ms 21048 KB Output is correct
9 Correct 117 ms 28376 KB Output is correct
10 Correct 94 ms 21032 KB Output is correct
11 Correct 144 ms 28648 KB Output is correct
12 Correct 137 ms 28692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 972 KB Output is correct
2 Correct 3 ms 1188 KB Output is correct
3 Correct 2 ms 840 KB Output is correct
4 Correct 3 ms 1100 KB Output is correct
5 Correct 2 ms 972 KB Output is correct
6 Correct 2 ms 972 KB Output is correct
7 Correct 3 ms 1100 KB Output is correct
8 Correct 3 ms 1100 KB Output is correct
9 Correct 3 ms 1100 KB Output is correct
10 Correct 3 ms 1100 KB Output is correct
11 Correct 3 ms 1216 KB Output is correct
12 Correct 3 ms 1100 KB Output is correct
13 Correct 2 ms 972 KB Output is correct
14 Correct 3 ms 1228 KB Output is correct
15 Correct 3 ms 972 KB Output is correct
16 Correct 3 ms 1228 KB Output is correct
17 Correct 2 ms 972 KB Output is correct
18 Correct 3 ms 1092 KB Output is correct
19 Correct 2 ms 1100 KB Output is correct
20 Correct 3 ms 1232 KB Output is correct
21 Correct 3 ms 1104 KB Output is correct
22 Correct 3 ms 1228 KB Output is correct
23 Correct 3 ms 1100 KB Output is correct
24 Correct 3 ms 1228 KB Output is correct
25 Correct 2 ms 968 KB Output is correct
26 Correct 3 ms 968 KB Output is correct
27 Correct 3 ms 1100 KB Output is correct
28 Correct 3 ms 1228 KB Output is correct
29 Correct 3 ms 1228 KB Output is correct
30 Correct 3 ms 1220 KB Output is correct
31 Correct 3 ms 1228 KB Output is correct
32 Correct 3 ms 1220 KB Output is correct
33 Correct 2 ms 1100 KB Output is correct
34 Correct 3 ms 1228 KB Output is correct
35 Correct 3 ms 1092 KB Output is correct
36 Correct 3 ms 1228 KB Output is correct
37 Correct 2 ms 844 KB Output is correct
38 Correct 3 ms 1228 KB Output is correct
39 Correct 106 ms 29088 KB Output is correct
40 Correct 109 ms 29272 KB Output is correct
41 Correct 98 ms 29084 KB Output is correct
42 Correct 102 ms 29000 KB Output is correct
43 Correct 102 ms 29188 KB Output is correct
44 Correct 104 ms 29200 KB Output is correct
45 Correct 41 ms 23108 KB Output is correct
46 Correct 46 ms 23728 KB Output is correct
47 Correct 105 ms 29248 KB Output is correct
48 Correct 114 ms 29196 KB Output is correct
49 Correct 113 ms 29196 KB Output is correct
50 Correct 114 ms 29256 KB Output is correct
51 Correct 100 ms 25580 KB Output is correct
52 Correct 95 ms 29076 KB Output is correct
53 Correct 98 ms 28052 KB Output is correct
54 Correct 101 ms 29264 KB Output is correct
55 Correct 146 ms 26212 KB Output is correct
56 Correct 122 ms 23648 KB Output is correct
57 Correct 59 ms 20468 KB Output is correct
58 Correct 70 ms 22992 KB Output is correct
59 Correct 142 ms 29304 KB Output is correct
60 Correct 160 ms 29176 KB Output is correct
61 Correct 145 ms 29252 KB Output is correct
62 Correct 151 ms 29252 KB Output is correct
63 Correct 160 ms 29176 KB Output is correct
64 Correct 144 ms 29180 KB Output is correct
65 Correct 105 ms 28184 KB Output is correct
66 Correct 132 ms 29192 KB Output is correct
67 Correct 94 ms 20812 KB Output is correct
68 Correct 115 ms 25348 KB Output is correct
69 Correct 139 ms 29280 KB Output is correct
70 Correct 131 ms 29232 KB Output is correct
71 Correct 92 ms 23484 KB Output is correct
72 Correct 114 ms 29212 KB Output is correct
73 Correct 172 ms 26436 KB Output is correct
74 Correct 181 ms 28092 KB Output is correct
75 Correct 170 ms 28996 KB Output is correct
76 Correct 120 ms 21508 KB Output is correct
77 Correct 154 ms 25504 KB Output is correct
78 Correct 175 ms 29020 KB Output is correct
79 Correct 82 ms 22316 KB Output is correct
80 Correct 95 ms 21048 KB Output is correct
81 Correct 117 ms 28376 KB Output is correct
82 Correct 94 ms 21032 KB Output is correct
83 Correct 144 ms 28648 KB Output is correct
84 Correct 137 ms 28692 KB Output is correct
85 Correct 157 ms 26252 KB Output is correct
86 Correct 164 ms 29180 KB Output is correct
87 Correct 135 ms 25864 KB Output is correct
88 Correct 158 ms 29244 KB Output is correct
89 Correct 121 ms 20404 KB Output is correct
90 Correct 151 ms 29252 KB Output is correct
91 Correct 131 ms 23824 KB Output is correct
92 Correct 114 ms 22728 KB Output is correct
93 Correct 160 ms 29224 KB Output is correct
94 Correct 156 ms 29180 KB Output is correct
95 Correct 149 ms 28356 KB Output is correct
96 Correct 168 ms 29192 KB Output is correct
97 Correct 156 ms 29180 KB Output is correct
98 Correct 126 ms 24716 KB Output is correct
99 Correct 113 ms 28216 KB Output is correct
100 Correct 128 ms 24620 KB Output is correct
101 Correct 138 ms 29336 KB Output is correct
102 Correct 115 ms 29440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 972 KB Output is correct
2 Correct 3 ms 1188 KB Output is correct
3 Correct 2 ms 840 KB Output is correct
4 Correct 3 ms 1100 KB Output is correct
5 Correct 2 ms 972 KB Output is correct
6 Correct 2 ms 972 KB Output is correct
7 Correct 3 ms 1100 KB Output is correct
8 Correct 3 ms 1100 KB Output is correct
9 Correct 3 ms 1100 KB Output is correct
10 Correct 3 ms 1100 KB Output is correct
11 Correct 3 ms 1216 KB Output is correct
12 Correct 3 ms 1100 KB Output is correct
13 Correct 2 ms 972 KB Output is correct
14 Correct 3 ms 1228 KB Output is correct
15 Correct 3 ms 972 KB Output is correct
16 Correct 3 ms 1228 KB Output is correct
17 Correct 2 ms 972 KB Output is correct
18 Correct 3 ms 1092 KB Output is correct
19 Correct 2 ms 1100 KB Output is correct
20 Correct 3 ms 1232 KB Output is correct
21 Correct 3 ms 1104 KB Output is correct
22 Correct 3 ms 1228 KB Output is correct
23 Correct 3 ms 1100 KB Output is correct
24 Correct 3 ms 1228 KB Output is correct
25 Correct 2 ms 968 KB Output is correct
26 Correct 3 ms 968 KB Output is correct
27 Correct 3 ms 1100 KB Output is correct
28 Correct 3 ms 1228 KB Output is correct
29 Correct 3 ms 1228 KB Output is correct
30 Correct 3 ms 1220 KB Output is correct
31 Correct 3 ms 1228 KB Output is correct
32 Correct 3 ms 1220 KB Output is correct
33 Correct 2 ms 1100 KB Output is correct
34 Correct 3 ms 1228 KB Output is correct
35 Correct 3 ms 1092 KB Output is correct
36 Correct 3 ms 1228 KB Output is correct
37 Correct 2 ms 844 KB Output is correct
38 Correct 3 ms 1228 KB Output is correct
39 Correct 106 ms 29088 KB Output is correct
40 Correct 109 ms 29272 KB Output is correct
41 Correct 98 ms 29084 KB Output is correct
42 Correct 102 ms 29000 KB Output is correct
43 Correct 102 ms 29188 KB Output is correct
44 Correct 104 ms 29200 KB Output is correct
45 Correct 41 ms 23108 KB Output is correct
46 Correct 46 ms 23728 KB Output is correct
47 Correct 105 ms 29248 KB Output is correct
48 Correct 114 ms 29196 KB Output is correct
49 Correct 113 ms 29196 KB Output is correct
50 Correct 114 ms 29256 KB Output is correct
51 Correct 100 ms 25580 KB Output is correct
52 Correct 95 ms 29076 KB Output is correct
53 Correct 98 ms 28052 KB Output is correct
54 Correct 101 ms 29264 KB Output is correct
55 Correct 731 ms 99300 KB Output is correct
56 Correct 559 ms 80452 KB Output is correct
57 Correct 873 ms 108412 KB Output is correct
58 Correct 574 ms 82008 KB Output is correct
59 Correct 578 ms 80704 KB Output is correct
60 Correct 825 ms 108612 KB Output is correct
61 Correct 349 ms 94184 KB Output is correct
62 Correct 385 ms 93244 KB Output is correct
63 Correct 914 ms 107536 KB Output is correct
64 Correct 868 ms 107536 KB Output is correct
65 Correct 708 ms 108588 KB Output is correct
66 Correct 766 ms 108612 KB Output is correct
67 Correct 727 ms 108644 KB Output is correct
68 Correct 761 ms 108732 KB Output is correct
69 Correct 745 ms 108580 KB Output is correct
70 Correct 758 ms 108592 KB Output is correct
71 Correct 753 ms 108632 KB Output is correct
72 Correct 761 ms 108588 KB Output is correct
73 Correct 770 ms 108588 KB Output is correct
74 Correct 758 ms 108608 KB Output is correct
75 Correct 743 ms 108612 KB Output is correct
76 Correct 805 ms 108712 KB Output is correct
77 Correct 796 ms 108592 KB Output is correct
78 Correct 798 ms 108800 KB Output is correct
79 Correct 700 ms 104516 KB Output is correct
80 Correct 738 ms 108892 KB Output is correct
81 Correct 557 ms 109508 KB Output is correct
82 Correct 146 ms 26212 KB Output is correct
83 Correct 122 ms 23648 KB Output is correct
84 Correct 59 ms 20468 KB Output is correct
85 Correct 70 ms 22992 KB Output is correct
86 Correct 142 ms 29304 KB Output is correct
87 Correct 160 ms 29176 KB Output is correct
88 Correct 145 ms 29252 KB Output is correct
89 Correct 151 ms 29252 KB Output is correct
90 Correct 160 ms 29176 KB Output is correct
91 Correct 144 ms 29180 KB Output is correct
92 Correct 105 ms 28184 KB Output is correct
93 Correct 132 ms 29192 KB Output is correct
94 Correct 94 ms 20812 KB Output is correct
95 Correct 115 ms 25348 KB Output is correct
96 Correct 139 ms 29280 KB Output is correct
97 Correct 131 ms 29232 KB Output is correct
98 Correct 92 ms 23484 KB Output is correct
99 Correct 114 ms 29212 KB Output is correct
100 Correct 172 ms 26436 KB Output is correct
101 Correct 181 ms 28092 KB Output is correct
102 Correct 170 ms 28996 KB Output is correct
103 Correct 120 ms 21508 KB Output is correct
104 Correct 154 ms 25504 KB Output is correct
105 Correct 175 ms 29020 KB Output is correct
106 Correct 82 ms 22316 KB Output is correct
107 Correct 95 ms 21048 KB Output is correct
108 Correct 117 ms 28376 KB Output is correct
109 Correct 94 ms 21032 KB Output is correct
110 Correct 144 ms 28648 KB Output is correct
111 Correct 137 ms 28692 KB Output is correct
112 Correct 157 ms 26252 KB Output is correct
113 Correct 164 ms 29180 KB Output is correct
114 Correct 135 ms 25864 KB Output is correct
115 Correct 158 ms 29244 KB Output is correct
116 Correct 121 ms 20404 KB Output is correct
117 Correct 151 ms 29252 KB Output is correct
118 Correct 131 ms 23824 KB Output is correct
119 Correct 114 ms 22728 KB Output is correct
120 Correct 160 ms 29224 KB Output is correct
121 Correct 156 ms 29180 KB Output is correct
122 Correct 149 ms 28356 KB Output is correct
123 Correct 168 ms 29192 KB Output is correct
124 Correct 156 ms 29180 KB Output is correct
125 Correct 126 ms 24716 KB Output is correct
126 Correct 113 ms 28216 KB Output is correct
127 Correct 128 ms 24620 KB Output is correct
128 Correct 138 ms 29336 KB Output is correct
129 Correct 115 ms 29440 KB Output is correct
130 Correct 835 ms 109688 KB Output is correct
131 Correct 579 ms 83280 KB Output is correct
132 Correct 783 ms 114052 KB Output is correct
133 Correct 736 ms 109636 KB Output is correct
134 Correct 678 ms 98776 KB Output is correct
135 Correct 837 ms 114724 KB Output is correct
136 Correct 924 ms 113632 KB Output is correct
137 Correct 922 ms 113732 KB Output is correct
138 Correct 707 ms 114456 KB Output is correct
139 Correct 752 ms 114440 KB Output is correct
140 Correct 731 ms 114336 KB Output is correct
141 Correct 766 ms 114324 KB Output is correct
142 Correct 764 ms 114372 KB Output is correct
143 Correct 742 ms 114272 KB Output is correct
144 Correct 758 ms 114392 KB Output is correct
145 Correct 778 ms 114524 KB Output is correct
146 Correct 746 ms 114372 KB Output is correct
147 Correct 740 ms 114256 KB Output is correct
148 Correct 754 ms 114384 KB Output is correct
149 Correct 761 ms 114292 KB Output is correct
150 Correct 466 ms 109864 KB Output is correct
151 Correct 677 ms 114304 KB Output is correct
152 Correct 688 ms 114232 KB Output is correct
153 Correct 557 ms 115208 KB Output is correct