답안 #475569

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
475569 2021-09-23T03:52:19 Z flashmt Diversity (CEOI21_diversity) C++17
100 / 100
4981 ms 6752 KB
#include <bits/stdc++.h>
using namespace std;
const int A = 3e5;
const int K = 1000;

inline long long getSum(int x)
{
  return x * (x + 1LL) / 2;
}

long long calc(vector<int> &smallCnt, map<int, int> &bigCnt, int sumAll)
{
  int side = 0;
  long long sum[2] = {0}, res = 0;

  auto go = [&](int k, int v)
  {
    int x = (v + 1) / 2, y = v / 2;

    res += 1LL * x * (sumAll - sum[side]) * sum[side] + getSum(x) * k * (sumAll - sum[side]);
    res -= getSum(x - 1) * k * sum[side] + (x - 1LL) * x * (x + 1) / 3 * k * k;
    res -= getSum(k - 1) * x;
    sum[side] += x * k;

    if (y)
    {
      res += 1LL * y * (sumAll - sum[side ^ 1]) * sum[side ^ 1] + getSum(y) * k * (sumAll - sum[side ^ 1]);
      res -= getSum(y - 1) * k * sum[side ^ 1] + (y - 1LL) * y * (y + 1) / 3 * k * k;
      res -= getSum(k - 1) * y;
      sum[side ^ 1] += y * k;
    }

    side ^= v % 2;
  };

  for (int i = 1; i < K; i++)
    if (smallCnt[i])
      go(i, smallCnt[i]);
  for (auto [k, v] : bigCnt)
    go(k, v);

  return res;
}

int main()
{
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  vector<int> a(n);
  for (int i = 0; i < n; i++)
  {
    cin >> a[i];
    a[i]--;
  }
  vector<int> l(q), r(q);
  for (int i = 0; i < q; i++)
  {
    cin >> l[i] >> r[i];
    l[i]--;
    r[i]--;
  }

  vector<int> id(q);
  iota(begin(id), end(id), 0);
  auto cmp = [&](int u, int v)
  {
    if (l[u] / K != l[v] / K)
      return l[u] < l[v];
    return l[u] / K & 1 ? r[u] < r[v] : r[u] > r[v];
  };
  sort(begin(id), end(id), cmp);

  vector<int> cnt(A), smallCnt(K);
  map<int, int> bigCnt;

  auto add = [&](int x)
  {
    if (cnt[x] < K) smallCnt[cnt[x]]--;
    else if (!--bigCnt[cnt[x]]) bigCnt.erase(cnt[x]);
    cnt[x]++;
    if (cnt[x] < K) smallCnt[cnt[x]]++;
    else bigCnt[cnt[x]]++;
  };

  auto remove = [&](int x)
  {
    if (cnt[x] < K) smallCnt[cnt[x]]--;
    else if (!--bigCnt[cnt[x]]) bigCnt.erase(cnt[x]);
    cnt[x]--;
    if (cnt[x] < K) smallCnt[cnt[x]]++;
    else bigCnt[cnt[x]]++;
  };

  vector<long long> ans(q);
  int curL = 0, curR = -1;
  for (int i : id)
  {
    while (curL > l[i])
      add(a[--curL]);
    while (curR < r[i])
      add(a[++curR]);
    while (curL < l[i])
      remove(a[curL++]);
    while (curR > r[i])
      remove(a[curR--]);
    ans[i] = calc(smallCnt, bigCnt, r[i] - l[i] + 1);
  }

  for (auto x : ans)
    cout << x << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 1 ms 1484 KB Output is correct
4 Correct 1 ms 1484 KB Output is correct
5 Correct 1 ms 1484 KB Output is correct
6 Correct 1 ms 1484 KB Output is correct
7 Correct 1 ms 1484 KB Output is correct
8 Correct 1 ms 1484 KB Output is correct
9 Correct 1 ms 1484 KB Output is correct
10 Correct 1 ms 1484 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 2 ms 1484 KB Output is correct
4 Correct 15 ms 2004 KB Output is correct
5 Correct 29 ms 2628 KB Output is correct
6 Correct 49 ms 3276 KB Output is correct
7 Correct 43 ms 3248 KB Output is correct
8 Correct 62 ms 3276 KB Output is correct
9 Correct 50 ms 3264 KB Output is correct
10 Correct 49 ms 3324 KB Output is correct
11 Correct 47 ms 3296 KB Output is correct
12 Correct 53 ms 3316 KB Output is correct
13 Correct 57 ms 3296 KB Output is correct
14 Correct 47 ms 3260 KB Output is correct
15 Correct 47 ms 3272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 2 ms 1484 KB Output is correct
4 Correct 15 ms 2004 KB Output is correct
5 Correct 29 ms 2628 KB Output is correct
6 Correct 49 ms 3276 KB Output is correct
7 Correct 43 ms 3248 KB Output is correct
8 Correct 62 ms 3276 KB Output is correct
9 Correct 50 ms 3264 KB Output is correct
10 Correct 49 ms 3324 KB Output is correct
11 Correct 47 ms 3296 KB Output is correct
12 Correct 53 ms 3316 KB Output is correct
13 Correct 57 ms 3296 KB Output is correct
14 Correct 47 ms 3260 KB Output is correct
15 Correct 47 ms 3272 KB Output is correct
16 Correct 1 ms 1484 KB Output is correct
17 Correct 1 ms 1484 KB Output is correct
18 Correct 2 ms 1484 KB Output is correct
19 Correct 18 ms 2152 KB Output is correct
20 Correct 38 ms 2792 KB Output is correct
21 Correct 55 ms 3464 KB Output is correct
22 Correct 55 ms 3432 KB Output is correct
23 Correct 54 ms 3444 KB Output is correct
24 Correct 70 ms 3440 KB Output is correct
25 Correct 56 ms 3404 KB Output is correct
26 Correct 55 ms 3396 KB Output is correct
27 Correct 57 ms 3444 KB Output is correct
28 Correct 54 ms 3268 KB Output is correct
29 Correct 52 ms 3404 KB Output is correct
30 Correct 61 ms 3444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 2 ms 1484 KB Output is correct
4 Correct 15 ms 2004 KB Output is correct
5 Correct 29 ms 2628 KB Output is correct
6 Correct 49 ms 3276 KB Output is correct
7 Correct 43 ms 3248 KB Output is correct
8 Correct 62 ms 3276 KB Output is correct
9 Correct 50 ms 3264 KB Output is correct
10 Correct 49 ms 3324 KB Output is correct
11 Correct 47 ms 3296 KB Output is correct
12 Correct 53 ms 3316 KB Output is correct
13 Correct 57 ms 3296 KB Output is correct
14 Correct 47 ms 3260 KB Output is correct
15 Correct 47 ms 3272 KB Output is correct
16 Correct 1 ms 1484 KB Output is correct
17 Correct 1 ms 1484 KB Output is correct
18 Correct 2 ms 1484 KB Output is correct
19 Correct 18 ms 2152 KB Output is correct
20 Correct 38 ms 2792 KB Output is correct
21 Correct 55 ms 3464 KB Output is correct
22 Correct 55 ms 3432 KB Output is correct
23 Correct 54 ms 3444 KB Output is correct
24 Correct 70 ms 3440 KB Output is correct
25 Correct 56 ms 3404 KB Output is correct
26 Correct 55 ms 3396 KB Output is correct
27 Correct 57 ms 3444 KB Output is correct
28 Correct 54 ms 3268 KB Output is correct
29 Correct 52 ms 3404 KB Output is correct
30 Correct 61 ms 3444 KB Output is correct
31 Correct 1 ms 1484 KB Output is correct
32 Correct 1 ms 1484 KB Output is correct
33 Correct 1 ms 1484 KB Output is correct
34 Correct 3 ms 1484 KB Output is correct
35 Correct 2 ms 1484 KB Output is correct
36 Correct 2 ms 1484 KB Output is correct
37 Correct 5 ms 1820 KB Output is correct
38 Correct 5 ms 1868 KB Output is correct
39 Correct 10 ms 2252 KB Output is correct
40 Correct 22 ms 3020 KB Output is correct
41 Correct 26 ms 3808 KB Output is correct
42 Correct 26 ms 3788 KB Output is correct
43 Correct 29 ms 3740 KB Output is correct
44 Correct 29 ms 3784 KB Output is correct
45 Correct 36 ms 3780 KB Output is correct
46 Correct 34 ms 3780 KB Output is correct
47 Correct 26 ms 3776 KB Output is correct
48 Correct 26 ms 3808 KB Output is correct
49 Correct 25 ms 3812 KB Output is correct
50 Correct 30 ms 3780 KB Output is correct
51 Correct 29 ms 3780 KB Output is correct
52 Correct 28 ms 3716 KB Output is correct
53 Correct 27 ms 3784 KB Output is correct
54 Correct 37 ms 3780 KB Output is correct
55 Correct 30 ms 3780 KB Output is correct
56 Correct 30 ms 3780 KB Output is correct
57 Correct 28 ms 3780 KB Output is correct
58 Correct 26 ms 3792 KB Output is correct
59 Correct 26 ms 3776 KB Output is correct
60 Correct 31 ms 3776 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 1 ms 1484 KB Output is correct
4 Correct 1 ms 1484 KB Output is correct
5 Correct 1 ms 1484 KB Output is correct
6 Correct 1 ms 1484 KB Output is correct
7 Correct 1 ms 1484 KB Output is correct
8 Correct 1 ms 1484 KB Output is correct
9 Correct 1 ms 1484 KB Output is correct
10 Correct 1 ms 1484 KB Output is correct
11 Correct 1 ms 1484 KB Output is correct
12 Correct 1 ms 1484 KB Output is correct
13 Correct 2 ms 1484 KB Output is correct
14 Correct 15 ms 2004 KB Output is correct
15 Correct 29 ms 2628 KB Output is correct
16 Correct 49 ms 3276 KB Output is correct
17 Correct 43 ms 3248 KB Output is correct
18 Correct 62 ms 3276 KB Output is correct
19 Correct 50 ms 3264 KB Output is correct
20 Correct 49 ms 3324 KB Output is correct
21 Correct 47 ms 3296 KB Output is correct
22 Correct 53 ms 3316 KB Output is correct
23 Correct 57 ms 3296 KB Output is correct
24 Correct 47 ms 3260 KB Output is correct
25 Correct 47 ms 3272 KB Output is correct
26 Correct 1 ms 1484 KB Output is correct
27 Correct 1 ms 1484 KB Output is correct
28 Correct 2 ms 1484 KB Output is correct
29 Correct 18 ms 2152 KB Output is correct
30 Correct 38 ms 2792 KB Output is correct
31 Correct 55 ms 3464 KB Output is correct
32 Correct 55 ms 3432 KB Output is correct
33 Correct 54 ms 3444 KB Output is correct
34 Correct 70 ms 3440 KB Output is correct
35 Correct 56 ms 3404 KB Output is correct
36 Correct 55 ms 3396 KB Output is correct
37 Correct 57 ms 3444 KB Output is correct
38 Correct 54 ms 3268 KB Output is correct
39 Correct 52 ms 3404 KB Output is correct
40 Correct 61 ms 3444 KB Output is correct
41 Correct 1 ms 1484 KB Output is correct
42 Correct 1 ms 1484 KB Output is correct
43 Correct 1 ms 1484 KB Output is correct
44 Correct 3 ms 1484 KB Output is correct
45 Correct 2 ms 1484 KB Output is correct
46 Correct 2 ms 1484 KB Output is correct
47 Correct 5 ms 1820 KB Output is correct
48 Correct 5 ms 1868 KB Output is correct
49 Correct 10 ms 2252 KB Output is correct
50 Correct 22 ms 3020 KB Output is correct
51 Correct 26 ms 3808 KB Output is correct
52 Correct 26 ms 3788 KB Output is correct
53 Correct 29 ms 3740 KB Output is correct
54 Correct 29 ms 3784 KB Output is correct
55 Correct 36 ms 3780 KB Output is correct
56 Correct 34 ms 3780 KB Output is correct
57 Correct 26 ms 3776 KB Output is correct
58 Correct 26 ms 3808 KB Output is correct
59 Correct 25 ms 3812 KB Output is correct
60 Correct 30 ms 3780 KB Output is correct
61 Correct 29 ms 3780 KB Output is correct
62 Correct 28 ms 3716 KB Output is correct
63 Correct 27 ms 3784 KB Output is correct
64 Correct 37 ms 3780 KB Output is correct
65 Correct 30 ms 3780 KB Output is correct
66 Correct 30 ms 3780 KB Output is correct
67 Correct 28 ms 3780 KB Output is correct
68 Correct 26 ms 3792 KB Output is correct
69 Correct 26 ms 3776 KB Output is correct
70 Correct 31 ms 3776 KB Output is correct
71 Correct 6 ms 1868 KB Output is correct
72 Correct 7 ms 1868 KB Output is correct
73 Correct 6 ms 1908 KB Output is correct
74 Correct 8 ms 1880 KB Output is correct
75 Correct 7 ms 1824 KB Output is correct
76 Correct 12 ms 2324 KB Output is correct
77 Correct 11 ms 2252 KB Output is correct
78 Correct 10 ms 2252 KB Output is correct
79 Correct 11 ms 2252 KB Output is correct
80 Correct 10 ms 2328 KB Output is correct
81 Correct 19 ms 3144 KB Output is correct
82 Correct 22 ms 3136 KB Output is correct
83 Correct 21 ms 3292 KB Output is correct
84 Correct 21 ms 3140 KB Output is correct
85 Correct 25 ms 3120 KB Output is correct
86 Correct 20 ms 3264 KB Output is correct
87 Correct 30 ms 3268 KB Output is correct
88 Correct 20 ms 3308 KB Output is correct
89 Correct 22 ms 3308 KB Output is correct
90 Correct 20 ms 3316 KB Output is correct
91 Correct 34 ms 4288 KB Output is correct
92 Correct 32 ms 4288 KB Output is correct
93 Correct 31 ms 4292 KB Output is correct
94 Correct 31 ms 4300 KB Output is correct
95 Correct 34 ms 4276 KB Output is correct
96 Correct 34 ms 4428 KB Output is correct
97 Correct 40 ms 4420 KB Output is correct
98 Correct 34 ms 4428 KB Output is correct
99 Correct 34 ms 4564 KB Output is correct
100 Correct 34 ms 4552 KB Output is correct
101 Correct 39 ms 4548 KB Output is correct
102 Correct 36 ms 4540 KB Output is correct
103 Correct 36 ms 4420 KB Output is correct
104 Correct 46 ms 4420 KB Output is correct
105 Correct 39 ms 4416 KB Output is correct
106 Correct 34 ms 4568 KB Output is correct
107 Correct 35 ms 4548 KB Output is correct
108 Correct 34 ms 4540 KB Output is correct
109 Correct 38 ms 4572 KB Output is correct
110 Correct 39 ms 4536 KB Output is correct
111 Correct 37 ms 4544 KB Output is correct
112 Correct 38 ms 4552 KB Output is correct
113 Correct 35 ms 4548 KB Output is correct
114 Correct 35 ms 4532 KB Output is correct
115 Correct 35 ms 4588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1484 KB Output is correct
2 Correct 1 ms 1484 KB Output is correct
3 Correct 1 ms 1484 KB Output is correct
4 Correct 1 ms 1484 KB Output is correct
5 Correct 1 ms 1484 KB Output is correct
6 Correct 1 ms 1484 KB Output is correct
7 Correct 1 ms 1484 KB Output is correct
8 Correct 1 ms 1484 KB Output is correct
9 Correct 1 ms 1484 KB Output is correct
10 Correct 1 ms 1484 KB Output is correct
11 Correct 1 ms 1484 KB Output is correct
12 Correct 1 ms 1484 KB Output is correct
13 Correct 2 ms 1484 KB Output is correct
14 Correct 15 ms 2004 KB Output is correct
15 Correct 29 ms 2628 KB Output is correct
16 Correct 49 ms 3276 KB Output is correct
17 Correct 43 ms 3248 KB Output is correct
18 Correct 62 ms 3276 KB Output is correct
19 Correct 50 ms 3264 KB Output is correct
20 Correct 49 ms 3324 KB Output is correct
21 Correct 47 ms 3296 KB Output is correct
22 Correct 53 ms 3316 KB Output is correct
23 Correct 57 ms 3296 KB Output is correct
24 Correct 47 ms 3260 KB Output is correct
25 Correct 47 ms 3272 KB Output is correct
26 Correct 1 ms 1484 KB Output is correct
27 Correct 1 ms 1484 KB Output is correct
28 Correct 2 ms 1484 KB Output is correct
29 Correct 18 ms 2152 KB Output is correct
30 Correct 38 ms 2792 KB Output is correct
31 Correct 55 ms 3464 KB Output is correct
32 Correct 55 ms 3432 KB Output is correct
33 Correct 54 ms 3444 KB Output is correct
34 Correct 70 ms 3440 KB Output is correct
35 Correct 56 ms 3404 KB Output is correct
36 Correct 55 ms 3396 KB Output is correct
37 Correct 57 ms 3444 KB Output is correct
38 Correct 54 ms 3268 KB Output is correct
39 Correct 52 ms 3404 KB Output is correct
40 Correct 61 ms 3444 KB Output is correct
41 Correct 1 ms 1484 KB Output is correct
42 Correct 1 ms 1484 KB Output is correct
43 Correct 1 ms 1484 KB Output is correct
44 Correct 3 ms 1484 KB Output is correct
45 Correct 2 ms 1484 KB Output is correct
46 Correct 2 ms 1484 KB Output is correct
47 Correct 5 ms 1820 KB Output is correct
48 Correct 5 ms 1868 KB Output is correct
49 Correct 10 ms 2252 KB Output is correct
50 Correct 22 ms 3020 KB Output is correct
51 Correct 26 ms 3808 KB Output is correct
52 Correct 26 ms 3788 KB Output is correct
53 Correct 29 ms 3740 KB Output is correct
54 Correct 29 ms 3784 KB Output is correct
55 Correct 36 ms 3780 KB Output is correct
56 Correct 34 ms 3780 KB Output is correct
57 Correct 26 ms 3776 KB Output is correct
58 Correct 26 ms 3808 KB Output is correct
59 Correct 25 ms 3812 KB Output is correct
60 Correct 30 ms 3780 KB Output is correct
61 Correct 29 ms 3780 KB Output is correct
62 Correct 28 ms 3716 KB Output is correct
63 Correct 27 ms 3784 KB Output is correct
64 Correct 37 ms 3780 KB Output is correct
65 Correct 30 ms 3780 KB Output is correct
66 Correct 30 ms 3780 KB Output is correct
67 Correct 28 ms 3780 KB Output is correct
68 Correct 26 ms 3792 KB Output is correct
69 Correct 26 ms 3776 KB Output is correct
70 Correct 31 ms 3776 KB Output is correct
71 Correct 6 ms 1868 KB Output is correct
72 Correct 7 ms 1868 KB Output is correct
73 Correct 6 ms 1908 KB Output is correct
74 Correct 8 ms 1880 KB Output is correct
75 Correct 7 ms 1824 KB Output is correct
76 Correct 12 ms 2324 KB Output is correct
77 Correct 11 ms 2252 KB Output is correct
78 Correct 10 ms 2252 KB Output is correct
79 Correct 11 ms 2252 KB Output is correct
80 Correct 10 ms 2328 KB Output is correct
81 Correct 19 ms 3144 KB Output is correct
82 Correct 22 ms 3136 KB Output is correct
83 Correct 21 ms 3292 KB Output is correct
84 Correct 21 ms 3140 KB Output is correct
85 Correct 25 ms 3120 KB Output is correct
86 Correct 20 ms 3264 KB Output is correct
87 Correct 30 ms 3268 KB Output is correct
88 Correct 20 ms 3308 KB Output is correct
89 Correct 22 ms 3308 KB Output is correct
90 Correct 20 ms 3316 KB Output is correct
91 Correct 34 ms 4288 KB Output is correct
92 Correct 32 ms 4288 KB Output is correct
93 Correct 31 ms 4292 KB Output is correct
94 Correct 31 ms 4300 KB Output is correct
95 Correct 34 ms 4276 KB Output is correct
96 Correct 34 ms 4428 KB Output is correct
97 Correct 40 ms 4420 KB Output is correct
98 Correct 34 ms 4428 KB Output is correct
99 Correct 34 ms 4564 KB Output is correct
100 Correct 34 ms 4552 KB Output is correct
101 Correct 39 ms 4548 KB Output is correct
102 Correct 36 ms 4540 KB Output is correct
103 Correct 36 ms 4420 KB Output is correct
104 Correct 46 ms 4420 KB Output is correct
105 Correct 39 ms 4416 KB Output is correct
106 Correct 34 ms 4568 KB Output is correct
107 Correct 35 ms 4548 KB Output is correct
108 Correct 34 ms 4540 KB Output is correct
109 Correct 38 ms 4572 KB Output is correct
110 Correct 39 ms 4536 KB Output is correct
111 Correct 37 ms 4544 KB Output is correct
112 Correct 38 ms 4552 KB Output is correct
113 Correct 35 ms 4548 KB Output is correct
114 Correct 35 ms 4532 KB Output is correct
115 Correct 35 ms 4588 KB Output is correct
116 Correct 333 ms 3372 KB Output is correct
117 Correct 310 ms 3396 KB Output is correct
118 Correct 448 ms 3964 KB Output is correct
119 Correct 389 ms 3920 KB Output is correct
120 Correct 365 ms 3920 KB Output is correct
121 Correct 459 ms 4392 KB Output is correct
122 Correct 428 ms 4400 KB Output is correct
123 Correct 758 ms 5280 KB Output is correct
124 Correct 643 ms 5444 KB Output is correct
125 Correct 606 ms 5432 KB Output is correct
126 Correct 3748 ms 5876 KB Output is correct
127 Correct 3566 ms 5876 KB Output is correct
128 Correct 3516 ms 5956 KB Output is correct
129 Correct 3579 ms 5876 KB Output is correct
130 Correct 3552 ms 5860 KB Output is correct
131 Correct 2021 ms 6084 KB Output is correct
132 Correct 2032 ms 6080 KB Output is correct
133 Correct 2406 ms 6028 KB Output is correct
134 Correct 2135 ms 6036 KB Output is correct
135 Correct 2237 ms 6036 KB Output is correct
136 Correct 1929 ms 6040 KB Output is correct
137 Correct 2129 ms 6052 KB Output is correct
138 Correct 1875 ms 6080 KB Output is correct
139 Correct 2099 ms 6028 KB Output is correct
140 Correct 2067 ms 6024 KB Output is correct
141 Correct 1162 ms 6092 KB Output is correct
142 Correct 1183 ms 6092 KB Output is correct
143 Correct 1195 ms 6064 KB Output is correct
144 Correct 1161 ms 6084 KB Output is correct
145 Correct 1165 ms 6060 KB Output is correct
146 Correct 974 ms 6340 KB Output is correct
147 Correct 957 ms 6340 KB Output is correct
148 Correct 964 ms 6320 KB Output is correct
149 Correct 974 ms 6344 KB Output is correct
150 Correct 949 ms 6328 KB Output is correct
151 Correct 945 ms 6356 KB Output is correct
152 Correct 987 ms 6468 KB Output is correct
153 Correct 979 ms 6360 KB Output is correct
154 Correct 975 ms 6352 KB Output is correct
155 Correct 1045 ms 6352 KB Output is correct
156 Correct 1765 ms 6724 KB Output is correct
157 Correct 1777 ms 6652 KB Output is correct
158 Correct 1886 ms 6628 KB Output is correct
159 Correct 1850 ms 6640 KB Output is correct
160 Correct 1848 ms 6740 KB Output is correct
161 Correct 3023 ms 6728 KB Output is correct
162 Correct 3088 ms 6736 KB Output is correct
163 Correct 3235 ms 6740 KB Output is correct
164 Correct 3160 ms 6752 KB Output is correct
165 Correct 3284 ms 6740 KB Output is correct
166 Correct 3688 ms 6528 KB Output is correct
167 Correct 3678 ms 6524 KB Output is correct
168 Correct 3684 ms 6524 KB Output is correct
169 Correct 3614 ms 6532 KB Output is correct
170 Correct 3723 ms 6596 KB Output is correct
171 Correct 4802 ms 6472 KB Output is correct
172 Correct 4981 ms 6464 KB Output is correct
173 Correct 4918 ms 6468 KB Output is correct
174 Correct 4892 ms 6464 KB Output is correct
175 Correct 4755 ms 6492 KB Output is correct