Submission #968558

# Submission time Handle Problem Language Result Execution time Memory
968558 2024-04-23T15:40:33 Z weakweakweak Real Mountains (CCO23_day1problem2) C++17
25 / 25
2740 ms 129472 KB
//我好笨,聽解了
/*
x + 
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
 
const int M = 1e6 + 3, N = M + 20, INF = (INT_MAX >> 1) - 3;
 
int o[N], n;
vector <int> v[N], b;
 
struct segmenttree {
    int a[N << 2];
    void build (int l, int r, int id) {
        if (l == r) {
            a[id] = b[o[l]];
            return;
        }
        int mid = (l + r) >> 1;
        build (l, mid, id << 1); build (mid + 1, r, id << 1 | 1);
        a[id] = min(a[id << 1], a[id << 1 | 1]);
    }
    int query (int l, int r, int ql, int qr, int id) {
        if (ql < 1 or qr > n or ql > qr) return INF;
        if (ql <= l and r <= qr) return a[id];
        int mid = (l + r) >> 1, ans = INT_MAX;
        if (ql <= mid) ans = min(ans, query(l, mid, ql, qr, id << 1));
        if (qr > mid)  ans = min(ans, query(mid + 1, r, ql, qr, id << 1 | 1));
        return ans;
    }
    void update (int l, int r, int pos, int val, int id) {
        if (l == r) {
            a[id] = o[pos] = val;
            return;
        }
        int mid = (l + r) >> 1;
        if (pos <= mid) update(l, mid, pos, val, id << 1);
        else update(mid + 1, r, pos, val, id << 1 | 1);
        a[id] = min(a[id << 1], a[id << 1 | 1]);
    }
}seg;
 

inline int f (int l, int r) {
    return (r - l + 1LL) * (r + l) / 2 % M;
}


int main () {
    ios_base::sync_with_stdio(false); cin.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> o[i];
        b.push_back(o[i]);
    }
    sort(b.begin(), b.end());
    b.erase(unique(b.begin(), b.end()), b.end());
    for (int i = 1; i <= n; i++) {
        o[i] = lower_bound(b.begin(), b.end(), o[i]) - b.begin();
        v[o[i]].push_back(i);
    }

    seg.build(1, n, 1);
 
    set<int> st;
    ll ans = 0;
    for (int h = 0; h + 1 < b.size(); h++) {
        int oh = b[h], nh = b[h + 1];
        for (int x : v[h]) {
            st.insert(x);
            seg.update(1, n, x, INF, 1);
        }
        while (st.size()) {
            int i = *st.begin();
            int left = seg.query(1, n, 1, i - 1, 1),   right = seg.query(1, n, i + 1, n, 1);
            if (left == INF or right == INF) st.erase(i);
            else break;
        }
        while (st.size()) {
            int i = *st.rbegin();
            int left = seg.query(1, n, 1, i - 1, 1),   right = seg.query(1, n, i + 1, n, 1);
            if (left == INF or right == INF) st.erase(i);
            else break;
        }
        if (st.size() == 1) {
            int i = *st.begin();
            int left = seg.query(1, n, 1, i - 1, 1),   right = seg.query(1, n, i + 1, n, 1);
            ans += f(oh, nh - 1) + (left +right) * 1LL * (nh - oh) % M;
        }
        else if (st.size() >= 2) {
            int il = *st.begin(), ir = *st.rbegin();
            ll left = seg.query(1, n, 1, il - 1, 1),   right = seg.query(1, n, ir + 1, n, 1);
            ll mid = seg.query(1, n, il + 1, ir - 1, 1);
            ll z = min( (left + right + min(left, right)) * 1LL * (nh - oh)      +      f(oh + 1, nh) + f(oh, nh - 1) * 2 ,
                        (left + mid + right) * 1LL * (nh - oh)     +    f(oh + 1, nh) + f(oh, nh - 1) * 2 );
            ans += z % M;
            ans += (st.size() - 2)  *  (f(oh + 1, nh) * 2LL + f(oh, nh - 1))  %  M;
        }
        ans %= M;
    }
 
    cout << ans << '\n';
return 0;}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:69:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   69 |     for (int h = 0; h + 1 < b.size(); h++) {
      |                     ~~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
35 Correct 11 ms 27484 KB Output is correct
36 Correct 11 ms 27484 KB Output is correct
37 Correct 11 ms 27480 KB Output is correct
38 Correct 12 ms 27484 KB Output is correct
39 Correct 11 ms 27484 KB Output is correct
40 Correct 8 ms 27484 KB Output is correct
41 Correct 9 ms 27736 KB Output is correct
42 Correct 8 ms 27488 KB Output is correct
43 Correct 11 ms 27488 KB Output is correct
44 Correct 11 ms 27488 KB Output is correct
45 Correct 11 ms 27516 KB Output is correct
46 Correct 11 ms 27484 KB Output is correct
47 Correct 12 ms 27640 KB Output is correct
48 Correct 14 ms 27404 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
35 Correct 11 ms 27484 KB Output is correct
36 Correct 11 ms 27484 KB Output is correct
37 Correct 11 ms 27480 KB Output is correct
38 Correct 12 ms 27484 KB Output is correct
39 Correct 11 ms 27484 KB Output is correct
40 Correct 8 ms 27484 KB Output is correct
41 Correct 9 ms 27736 KB Output is correct
42 Correct 8 ms 27488 KB Output is correct
43 Correct 11 ms 27488 KB Output is correct
44 Correct 11 ms 27488 KB Output is correct
45 Correct 11 ms 27516 KB Output is correct
46 Correct 11 ms 27484 KB Output is correct
47 Correct 12 ms 27640 KB Output is correct
48 Correct 14 ms 27404 KB Output is correct
49 Correct 12 ms 27484 KB Output is correct
50 Correct 11 ms 27460 KB Output is correct
51 Correct 12 ms 27484 KB Output is correct
52 Correct 15 ms 27480 KB Output is correct
53 Correct 17 ms 27480 KB Output is correct
54 Correct 8 ms 27484 KB Output is correct
55 Correct 8 ms 27484 KB Output is correct
56 Correct 10 ms 27484 KB Output is correct
57 Correct 13 ms 27736 KB Output is correct
58 Correct 13 ms 27484 KB Output is correct
59 Correct 11 ms 27676 KB Output is correct
60 Correct 13 ms 27484 KB Output is correct
61 Correct 15 ms 27612 KB Output is correct
62 Correct 11 ms 27484 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
35 Correct 900 ms 95776 KB Output is correct
36 Correct 933 ms 95836 KB Output is correct
37 Correct 968 ms 95856 KB Output is correct
38 Correct 963 ms 95832 KB Output is correct
39 Correct 943 ms 95728 KB Output is correct
40 Correct 5 ms 24924 KB Output is correct
41 Correct 6 ms 25124 KB Output is correct
42 Correct 678 ms 94764 KB Output is correct
43 Correct 632 ms 94580 KB Output is correct
44 Correct 614 ms 94464 KB Output is correct
45 Correct 342 ms 95696 KB Output is correct
46 Correct 314 ms 96120 KB Output is correct
47 Correct 318 ms 95600 KB Output is correct
48 Correct 456 ms 95940 KB Output is correct
49 Correct 467 ms 95836 KB Output is correct
50 Correct 455 ms 95732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
35 Correct 11 ms 27484 KB Output is correct
36 Correct 11 ms 27484 KB Output is correct
37 Correct 11 ms 27480 KB Output is correct
38 Correct 12 ms 27484 KB Output is correct
39 Correct 11 ms 27484 KB Output is correct
40 Correct 8 ms 27484 KB Output is correct
41 Correct 9 ms 27736 KB Output is correct
42 Correct 8 ms 27488 KB Output is correct
43 Correct 11 ms 27488 KB Output is correct
44 Correct 11 ms 27488 KB Output is correct
45 Correct 11 ms 27516 KB Output is correct
46 Correct 11 ms 27484 KB Output is correct
47 Correct 12 ms 27640 KB Output is correct
48 Correct 14 ms 27404 KB Output is correct
49 Correct 900 ms 95776 KB Output is correct
50 Correct 933 ms 95836 KB Output is correct
51 Correct 968 ms 95856 KB Output is correct
52 Correct 963 ms 95832 KB Output is correct
53 Correct 943 ms 95728 KB Output is correct
54 Correct 5 ms 24924 KB Output is correct
55 Correct 6 ms 25124 KB Output is correct
56 Correct 678 ms 94764 KB Output is correct
57 Correct 632 ms 94580 KB Output is correct
58 Correct 614 ms 94464 KB Output is correct
59 Correct 342 ms 95696 KB Output is correct
60 Correct 314 ms 96120 KB Output is correct
61 Correct 318 ms 95600 KB Output is correct
62 Correct 456 ms 95940 KB Output is correct
63 Correct 467 ms 95836 KB Output is correct
64 Correct 455 ms 95732 KB Output is correct
65 Correct 2740 ms 114596 KB Output is correct
66 Correct 2335 ms 114616 KB Output is correct
67 Correct 2442 ms 114672 KB Output is correct
68 Correct 2498 ms 114488 KB Output is correct
69 Correct 2426 ms 114772 KB Output is correct
70 Correct 633 ms 94996 KB Output is correct
71 Correct 646 ms 94548 KB Output is correct
72 Correct 630 ms 94656 KB Output is correct
73 Correct 1208 ms 114684 KB Output is correct
74 Correct 1012 ms 114796 KB Output is correct
75 Correct 985 ms 115068 KB Output is correct
76 Correct 1451 ms 114348 KB Output is correct
77 Correct 1401 ms 114536 KB Output is correct
78 Correct 1464 ms 114812 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 24924 KB Output is correct
2 Correct 5 ms 24924 KB Output is correct
3 Correct 6 ms 24924 KB Output is correct
4 Correct 8 ms 27484 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 8 ms 27228 KB Output is correct
7 Correct 6 ms 27216 KB Output is correct
8 Correct 7 ms 27484 KB Output is correct
9 Correct 8 ms 27228 KB Output is correct
10 Correct 7 ms 27228 KB Output is correct
11 Correct 7 ms 27484 KB Output is correct
12 Correct 9 ms 27372 KB Output is correct
13 Correct 8 ms 27484 KB Output is correct
14 Correct 5 ms 24924 KB Output is correct
15 Correct 5 ms 24920 KB Output is correct
16 Correct 8 ms 27484 KB Output is correct
17 Correct 8 ms 27484 KB Output is correct
18 Correct 7 ms 27344 KB Output is correct
19 Correct 9 ms 27484 KB Output is correct
20 Correct 8 ms 27400 KB Output is correct
21 Correct 8 ms 27484 KB Output is correct
22 Correct 8 ms 27484 KB Output is correct
23 Correct 9 ms 27508 KB Output is correct
24 Correct 7 ms 27484 KB Output is correct
25 Correct 7 ms 27484 KB Output is correct
26 Correct 9 ms 27484 KB Output is correct
27 Correct 7 ms 27484 KB Output is correct
28 Correct 8 ms 27480 KB Output is correct
29 Correct 5 ms 24924 KB Output is correct
30 Correct 5 ms 24924 KB Output is correct
31 Correct 6 ms 24924 KB Output is correct
32 Correct 7 ms 24924 KB Output is correct
33 Correct 5 ms 24924 KB Output is correct
34 Correct 6 ms 24924 KB Output is correct
35 Correct 11 ms 27484 KB Output is correct
36 Correct 11 ms 27484 KB Output is correct
37 Correct 11 ms 27480 KB Output is correct
38 Correct 12 ms 27484 KB Output is correct
39 Correct 11 ms 27484 KB Output is correct
40 Correct 8 ms 27484 KB Output is correct
41 Correct 9 ms 27736 KB Output is correct
42 Correct 8 ms 27488 KB Output is correct
43 Correct 11 ms 27488 KB Output is correct
44 Correct 11 ms 27488 KB Output is correct
45 Correct 11 ms 27516 KB Output is correct
46 Correct 11 ms 27484 KB Output is correct
47 Correct 12 ms 27640 KB Output is correct
48 Correct 14 ms 27404 KB Output is correct
49 Correct 12 ms 27484 KB Output is correct
50 Correct 11 ms 27460 KB Output is correct
51 Correct 12 ms 27484 KB Output is correct
52 Correct 15 ms 27480 KB Output is correct
53 Correct 17 ms 27480 KB Output is correct
54 Correct 8 ms 27484 KB Output is correct
55 Correct 8 ms 27484 KB Output is correct
56 Correct 10 ms 27484 KB Output is correct
57 Correct 13 ms 27736 KB Output is correct
58 Correct 13 ms 27484 KB Output is correct
59 Correct 11 ms 27676 KB Output is correct
60 Correct 13 ms 27484 KB Output is correct
61 Correct 15 ms 27612 KB Output is correct
62 Correct 11 ms 27484 KB Output is correct
63 Correct 900 ms 95776 KB Output is correct
64 Correct 933 ms 95836 KB Output is correct
65 Correct 968 ms 95856 KB Output is correct
66 Correct 963 ms 95832 KB Output is correct
67 Correct 943 ms 95728 KB Output is correct
68 Correct 5 ms 24924 KB Output is correct
69 Correct 6 ms 25124 KB Output is correct
70 Correct 678 ms 94764 KB Output is correct
71 Correct 632 ms 94580 KB Output is correct
72 Correct 614 ms 94464 KB Output is correct
73 Correct 342 ms 95696 KB Output is correct
74 Correct 314 ms 96120 KB Output is correct
75 Correct 318 ms 95600 KB Output is correct
76 Correct 456 ms 95940 KB Output is correct
77 Correct 467 ms 95836 KB Output is correct
78 Correct 455 ms 95732 KB Output is correct
79 Correct 2740 ms 114596 KB Output is correct
80 Correct 2335 ms 114616 KB Output is correct
81 Correct 2442 ms 114672 KB Output is correct
82 Correct 2498 ms 114488 KB Output is correct
83 Correct 2426 ms 114772 KB Output is correct
84 Correct 633 ms 94996 KB Output is correct
85 Correct 646 ms 94548 KB Output is correct
86 Correct 630 ms 94656 KB Output is correct
87 Correct 1208 ms 114684 KB Output is correct
88 Correct 1012 ms 114796 KB Output is correct
89 Correct 985 ms 115068 KB Output is correct
90 Correct 1451 ms 114348 KB Output is correct
91 Correct 1401 ms 114536 KB Output is correct
92 Correct 1464 ms 114812 KB Output is correct
93 Correct 620 ms 94464 KB Output is correct
94 Correct 1475 ms 129472 KB Output is correct
95 Correct 1507 ms 129176 KB Output is correct
96 Correct 1512 ms 129252 KB Output is correct
97 Correct 1655 ms 128864 KB Output is correct
98 Correct 1679 ms 128728 KB Output is correct
99 Correct 1707 ms 128988 KB Output is correct
100 Correct 2686 ms 129396 KB Output is correct
101 Correct 2682 ms 128920 KB Output is correct
102 Correct 2692 ms 128944 KB Output is correct
103 Correct 2697 ms 128956 KB Output is correct
104 Correct 2645 ms 129044 KB Output is correct
105 Correct 389 ms 94564 KB Output is correct
106 Correct 612 ms 94400 KB Output is correct