답안 #1113080

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1113080 2024-11-15T16:37:41 Z duckindog Real Mountains (CCO23_day1problem2) C++17
25 / 25
2900 ms 198472 KB
#include <bits/stdc++.h>

using namespace std;

const int N = 1'000'000 + 10,
          M = 1'000'003,
          MAX = 1'000'000'001;
int n;
int h[N];

int prefMax[N], suffMax[N];
int goalH[N];

int f[N << 2];
void build(int s, int l, int r) { 
  if (l == r) { 
    f[s] = h[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(s << 1, l, mid); build(s << 1 | 1, mid + 1, r);
  f[s] = min(f[s << 1], f[s << 1 | 1]);
}
void update(int s, int l, int r, int p, int x) { 
  if (p < l || p > r) return;
  if (l == r) { 
    f[s] = x;
    return;
  }
  int mid = (l + r) >> 1;
  update(s << 1, l, mid, p, x); update(s << 1 | 1, mid + 1, r, p, x);
  f[s] = min(f[s << 1], f[s << 1 | 1]);
}
int query(int s, int l, int r, int u, int v) { 
  if (v < l || u > r) return MAX;
  if (u <= l && r <= v) return f[s];
  int mid = (l + r) >> 1;
  return min(query(s << 1, l, mid, u, v), query(s << 1 | 1, mid + 1, r, u, v));
}

set<int> s[N];
vector<int> del[N];

int32_t main() { 
  cin.tie(0)->sync_with_stdio(0);

  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> h[i];

  build(1, 1, n);
  
  vector<int> allValue(h + 1, h + n + 1);
  sort(allValue.begin(), allValue.end());
  allValue.erase(unique(allValue.begin(), allValue.end()), allValue.end());

  for (int i = 1; i <= n; ++i) 
    h[i] = lower_bound(allValue.begin(), allValue.end(), h[i]) - allValue.begin();

  for (int i = 1; i <= n; ++i) prefMax[i] = max(prefMax[i - 1], h[i]);
  for (int i = n; i >= 1; --i) suffMax[i] = max(suffMax[i + 1], h[i]);

  for (int i = 1; i <= n; ++i) goalH[i] = min(prefMax[i], suffMax[i]);
  
  for (int i = 1; i <= n; ++i) { 
    s[h[i]].insert(i);
    del[goalH[i]].push_back(i);
  }

  auto sum = [&](int l, int r) { 
    return (1ll * (r + l) * (r - l + 1) / 2) % M;
  };

  auto add = [&](auto& x, const auto& y) { 
    x += y;
    if (x >= M) x -= M;
  };

  int answer = 0;
  set<int> vt;
  for (int it = 0; it < (int)allValue.size() - 1; ++it) { 
    int height = allValue[it], nxtHeight = allValue[it + 1];
    
    for (const auto& i : s[it]) { 
      vt.insert(i);
      update(1, 1, n, i, MAX);
    }
    for (const auto& i : del[it]) vt.erase(i);

    if (!vt.size()) continue;
    
    int cnt = nxtHeight - height;
    if (vt.size() == 1) { 
      int i = *vt.begin();
      add(answer, 1ll * cnt * (query(1, 1, n, 1, i) + query(1, 1, n, i, n)) % M);
      add(answer, sum(height, nxtHeight - 1));
    } else { 
      int l = *vt.begin(), r = *vt.rbegin();

      long long addLFirst = 1ll * query(1, 1, n, 1, l) + query(1, 1, n, l, n) +
                            query(1, 1, n, r, n);
      long long addRFirst = 1ll * query(1, 1, n, 1, r) + query(1, 1, n, r, n) +
                            query(1, 1, n, 1, l);
      
      add(answer, min(addLFirst, addRFirst) % M * cnt % M);
      add(answer, sum(height, nxtHeight - 1));
      add(answer, sum(height, nxtHeight - 1));
      add(answer, sum(height + 1, nxtHeight));

      int total = 0;
      add(total, sum(height, nxtHeight - 1));
      add(total, sum(height + 1, nxtHeight));
      add(total, sum(height + 1, nxtHeight));
      
      add(answer, 1ll * (vt.size() - 2) * total % M);
    }
  }

  cout << answer << "\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
35 Correct 60 ms 71408 KB Output is correct
36 Correct 54 ms 71496 KB Output is correct
37 Correct 53 ms 71496 KB Output is correct
38 Correct 54 ms 71496 KB Output is correct
39 Correct 55 ms 71412 KB Output is correct
40 Correct 53 ms 71496 KB Output is correct
41 Correct 52 ms 71496 KB Output is correct
42 Correct 55 ms 71512 KB Output is correct
43 Correct 52 ms 71460 KB Output is correct
44 Correct 52 ms 71504 KB Output is correct
45 Correct 57 ms 71496 KB Output is correct
46 Correct 52 ms 71496 KB Output is correct
47 Correct 53 ms 71436 KB Output is correct
48 Correct 54 ms 71548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
35 Correct 60 ms 71408 KB Output is correct
36 Correct 54 ms 71496 KB Output is correct
37 Correct 53 ms 71496 KB Output is correct
38 Correct 54 ms 71496 KB Output is correct
39 Correct 55 ms 71412 KB Output is correct
40 Correct 53 ms 71496 KB Output is correct
41 Correct 52 ms 71496 KB Output is correct
42 Correct 55 ms 71512 KB Output is correct
43 Correct 52 ms 71460 KB Output is correct
44 Correct 52 ms 71504 KB Output is correct
45 Correct 57 ms 71496 KB Output is correct
46 Correct 52 ms 71496 KB Output is correct
47 Correct 53 ms 71436 KB Output is correct
48 Correct 54 ms 71548 KB Output is correct
49 Correct 54 ms 71496 KB Output is correct
50 Correct 52 ms 71496 KB Output is correct
51 Correct 51 ms 71468 KB Output is correct
52 Correct 51 ms 71496 KB Output is correct
53 Correct 51 ms 71524 KB Output is correct
54 Correct 49 ms 71436 KB Output is correct
55 Correct 48 ms 71508 KB Output is correct
56 Correct 51 ms 71508 KB Output is correct
57 Correct 54 ms 71496 KB Output is correct
58 Correct 55 ms 71452 KB Output is correct
59 Correct 55 ms 71620 KB Output is correct
60 Correct 54 ms 71612 KB Output is correct
61 Correct 53 ms 71496 KB Output is correct
62 Correct 51 ms 71496 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
35 Correct 1531 ms 197900 KB Output is correct
36 Correct 1419 ms 196716 KB Output is correct
37 Correct 1496 ms 197848 KB Output is correct
38 Correct 1552 ms 197636 KB Output is correct
39 Correct 1448 ms 197608 KB Output is correct
40 Correct 48 ms 70824 KB Output is correct
41 Correct 42 ms 70788 KB Output is correct
42 Correct 881 ms 197804 KB Output is correct
43 Correct 908 ms 197916 KB Output is correct
44 Correct 994 ms 198060 KB Output is correct
45 Correct 651 ms 198472 KB Output is correct
46 Correct 598 ms 196048 KB Output is correct
47 Correct 576 ms 197804 KB Output is correct
48 Correct 890 ms 196012 KB Output is correct
49 Correct 865 ms 195844 KB Output is correct
50 Correct 763 ms 195756 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
35 Correct 60 ms 71408 KB Output is correct
36 Correct 54 ms 71496 KB Output is correct
37 Correct 53 ms 71496 KB Output is correct
38 Correct 54 ms 71496 KB Output is correct
39 Correct 55 ms 71412 KB Output is correct
40 Correct 53 ms 71496 KB Output is correct
41 Correct 52 ms 71496 KB Output is correct
42 Correct 55 ms 71512 KB Output is correct
43 Correct 52 ms 71460 KB Output is correct
44 Correct 52 ms 71504 KB Output is correct
45 Correct 57 ms 71496 KB Output is correct
46 Correct 52 ms 71496 KB Output is correct
47 Correct 53 ms 71436 KB Output is correct
48 Correct 54 ms 71548 KB Output is correct
49 Correct 1531 ms 197900 KB Output is correct
50 Correct 1419 ms 196716 KB Output is correct
51 Correct 1496 ms 197848 KB Output is correct
52 Correct 1552 ms 197636 KB Output is correct
53 Correct 1448 ms 197608 KB Output is correct
54 Correct 48 ms 70824 KB Output is correct
55 Correct 42 ms 70788 KB Output is correct
56 Correct 881 ms 197804 KB Output is correct
57 Correct 908 ms 197916 KB Output is correct
58 Correct 994 ms 198060 KB Output is correct
59 Correct 651 ms 198472 KB Output is correct
60 Correct 598 ms 196048 KB Output is correct
61 Correct 576 ms 197804 KB Output is correct
62 Correct 890 ms 196012 KB Output is correct
63 Correct 865 ms 195844 KB Output is correct
64 Correct 763 ms 195756 KB Output is correct
65 Correct 2408 ms 196468 KB Output is correct
66 Correct 2635 ms 196328 KB Output is correct
67 Correct 2378 ms 196408 KB Output is correct
68 Correct 2472 ms 196356 KB Output is correct
69 Correct 2485 ms 196392 KB Output is correct
70 Correct 881 ms 196524 KB Output is correct
71 Correct 958 ms 196412 KB Output is correct
72 Correct 987 ms 196348 KB Output is correct
73 Correct 976 ms 196496 KB Output is correct
74 Correct 902 ms 196524 KB Output is correct
75 Correct 893 ms 196344 KB Output is correct
76 Correct 1311 ms 196236 KB Output is correct
77 Correct 1472 ms 196256 KB Output is correct
78 Correct 1374 ms 196024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 70828 KB Output is correct
2 Correct 50 ms 70736 KB Output is correct
3 Correct 46 ms 70776 KB Output is correct
4 Correct 49 ms 71496 KB Output is correct
5 Correct 43 ms 71240 KB Output is correct
6 Correct 44 ms 71416 KB Output is correct
7 Correct 42 ms 71240 KB Output is correct
8 Correct 44 ms 71460 KB Output is correct
9 Correct 42 ms 71180 KB Output is correct
10 Correct 42 ms 71240 KB Output is correct
11 Correct 43 ms 71532 KB Output is correct
12 Correct 45 ms 71356 KB Output is correct
13 Correct 46 ms 71512 KB Output is correct
14 Correct 41 ms 70788 KB Output is correct
15 Correct 43 ms 70736 KB Output is correct
16 Correct 44 ms 71496 KB Output is correct
17 Correct 45 ms 71588 KB Output is correct
18 Correct 46 ms 71496 KB Output is correct
19 Correct 46 ms 71504 KB Output is correct
20 Correct 50 ms 71496 KB Output is correct
21 Correct 46 ms 71500 KB Output is correct
22 Correct 44 ms 71568 KB Output is correct
23 Correct 44 ms 71496 KB Output is correct
24 Correct 50 ms 71508 KB Output is correct
25 Correct 51 ms 71548 KB Output is correct
26 Correct 51 ms 71496 KB Output is correct
27 Correct 57 ms 71564 KB Output is correct
28 Correct 54 ms 71496 KB Output is correct
29 Correct 49 ms 70784 KB Output is correct
30 Correct 48 ms 70728 KB Output is correct
31 Correct 48 ms 70736 KB Output is correct
32 Correct 48 ms 70736 KB Output is correct
33 Correct 46 ms 70728 KB Output is correct
34 Correct 51 ms 70728 KB Output is correct
35 Correct 60 ms 71408 KB Output is correct
36 Correct 54 ms 71496 KB Output is correct
37 Correct 53 ms 71496 KB Output is correct
38 Correct 54 ms 71496 KB Output is correct
39 Correct 55 ms 71412 KB Output is correct
40 Correct 53 ms 71496 KB Output is correct
41 Correct 52 ms 71496 KB Output is correct
42 Correct 55 ms 71512 KB Output is correct
43 Correct 52 ms 71460 KB Output is correct
44 Correct 52 ms 71504 KB Output is correct
45 Correct 57 ms 71496 KB Output is correct
46 Correct 52 ms 71496 KB Output is correct
47 Correct 53 ms 71436 KB Output is correct
48 Correct 54 ms 71548 KB Output is correct
49 Correct 54 ms 71496 KB Output is correct
50 Correct 52 ms 71496 KB Output is correct
51 Correct 51 ms 71468 KB Output is correct
52 Correct 51 ms 71496 KB Output is correct
53 Correct 51 ms 71524 KB Output is correct
54 Correct 49 ms 71436 KB Output is correct
55 Correct 48 ms 71508 KB Output is correct
56 Correct 51 ms 71508 KB Output is correct
57 Correct 54 ms 71496 KB Output is correct
58 Correct 55 ms 71452 KB Output is correct
59 Correct 55 ms 71620 KB Output is correct
60 Correct 54 ms 71612 KB Output is correct
61 Correct 53 ms 71496 KB Output is correct
62 Correct 51 ms 71496 KB Output is correct
63 Correct 1531 ms 197900 KB Output is correct
64 Correct 1419 ms 196716 KB Output is correct
65 Correct 1496 ms 197848 KB Output is correct
66 Correct 1552 ms 197636 KB Output is correct
67 Correct 1448 ms 197608 KB Output is correct
68 Correct 48 ms 70824 KB Output is correct
69 Correct 42 ms 70788 KB Output is correct
70 Correct 881 ms 197804 KB Output is correct
71 Correct 908 ms 197916 KB Output is correct
72 Correct 994 ms 198060 KB Output is correct
73 Correct 651 ms 198472 KB Output is correct
74 Correct 598 ms 196048 KB Output is correct
75 Correct 576 ms 197804 KB Output is correct
76 Correct 890 ms 196012 KB Output is correct
77 Correct 865 ms 195844 KB Output is correct
78 Correct 763 ms 195756 KB Output is correct
79 Correct 2408 ms 196468 KB Output is correct
80 Correct 2635 ms 196328 KB Output is correct
81 Correct 2378 ms 196408 KB Output is correct
82 Correct 2472 ms 196356 KB Output is correct
83 Correct 2485 ms 196392 KB Output is correct
84 Correct 881 ms 196524 KB Output is correct
85 Correct 958 ms 196412 KB Output is correct
86 Correct 987 ms 196348 KB Output is correct
87 Correct 976 ms 196496 KB Output is correct
88 Correct 902 ms 196524 KB Output is correct
89 Correct 893 ms 196344 KB Output is correct
90 Correct 1311 ms 196236 KB Output is correct
91 Correct 1472 ms 196256 KB Output is correct
92 Correct 1374 ms 196024 KB Output is correct
93 Correct 914 ms 196488 KB Output is correct
94 Correct 1077 ms 196328 KB Output is correct
95 Correct 1181 ms 196524 KB Output is correct
96 Correct 1170 ms 196524 KB Output is correct
97 Correct 1517 ms 195980 KB Output is correct
98 Correct 1392 ms 196148 KB Output is correct
99 Correct 1545 ms 196052 KB Output is correct
100 Correct 2784 ms 196416 KB Output is correct
101 Correct 2362 ms 196280 KB Output is correct
102 Correct 2639 ms 196448 KB Output is correct
103 Correct 2621 ms 196280 KB Output is correct
104 Correct 2900 ms 196448 KB Output is correct
105 Correct 964 ms 196468 KB Output is correct
106 Correct 950 ms 196524 KB Output is correct