Submission #1043722

# Submission time Handle Problem Language Result Execution time Memory
1043722 2024-08-04T14:48:40 Z juicy Council (JOI23_council) C++17
100 / 100
546 ms 46952 KB
// https://oj.uz/submission/767768 <3

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif

const int N = 3e5 + 5, MAX = 1e9;
const array<int, 2> inf = {MAX, MAX};

int n, m;
int a[N], cnt[20];
array<array<int, 2>, 2> f[1 << 20], g[1 << 20];

void add(array<array<int, 2>, 2> &x, array<int, 2> y) {
  for (auto it : x) {
    if (it[1] == y[1]) {
      return;
    }
  }
  if (y[0] < x[0][0]) {
    x[1] = x[0];
    x[0] = y;
  } else {
    x[1] = min(x[1], y);
  }
}

void upd(array<array<int, 2>, 2> &x, array<array<int, 2>, 2> y) {
  for (auto it : y) {
    add(x, it);
  }
}

int main() {
  ios::sync_with_stdio(false); cin.tie(nullptr);

  cin >> n >> m;
  for (int i = 0; i < (1 << m); ++i) {
    f[i] = g[i] = {inf, inf};
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < m; ++j) {
      int x; cin >> x;
      a[i] += x << j;
      cnt[j] += x;
    }
    add(f[a[i]], {__builtin_popcount(a[i]), i});
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < (1 << m); ++j) {
      if (!(j >> i & 1)) {
        upd(f[j], f[j ^ (1 << i)]);
      }
    }
  }
  for (int i = 0; i < (1 << m); ++i) {
    int cnt = __builtin_popcount(i);
    for (auto [x, it] : f[i]) {
      add(g[i], {x - cnt, it});
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < (1 << m); ++j) {
      if (j >> i & 1) {
        upd(g[j], g[j ^ (1 << i)]);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    int mask = (1 << m) - 1, res = 0;
    for (int j = 0; j < m; ++j) {
      int c = a[i] >> j & 1;
      cnt[j] -= c;
      if (cnt[j] > n / 2) {
        ++res;
      } else if (cnt[j] == n / 2) {
        mask ^= 1 << j;
        ++res;
      }
      cnt[j] += c;
    }
    for (auto [x, it] : g[mask]) {
      if (it != i) {
        res -= x;
        break;
      }
    }
    cout << res << "\n";
  }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 4444 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 102 ms 33368 KB Output is correct
6 Correct 98 ms 33368 KB Output is correct
7 Correct 100 ms 33372 KB Output is correct
8 Correct 108 ms 33448 KB Output is correct
9 Correct 158 ms 33464 KB Output is correct
10 Correct 98 ms 33368 KB Output is correct
11 Correct 114 ms 33472 KB Output is correct
12 Correct 156 ms 33460 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4572 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 0 ms 4444 KB Output is correct
19 Correct 1 ms 4440 KB Output is correct
20 Correct 1 ms 4444 KB Output is correct
21 Correct 1 ms 4444 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4444 KB Output is correct
24 Correct 0 ms 4444 KB Output is correct
25 Correct 0 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 0 ms 4444 KB Output is correct
28 Correct 1 ms 4472 KB Output is correct
29 Correct 0 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 0 ms 4560 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 0 ms 4444 KB Output is correct
37 Correct 1 ms 4440 KB Output is correct
38 Correct 1 ms 4444 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 2 ms 8796 KB Output is correct
42 Correct 2 ms 8796 KB Output is correct
43 Correct 3 ms 8796 KB Output is correct
44 Correct 2 ms 8852 KB Output is correct
45 Correct 3 ms 8792 KB Output is correct
46 Correct 11 ms 8856 KB Output is correct
47 Correct 12 ms 8796 KB Output is correct
48 Correct 13 ms 8848 KB Output is correct
49 Correct 11 ms 8792 KB Output is correct
50 Correct 13 ms 8792 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 4444 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 102 ms 33368 KB Output is correct
6 Correct 98 ms 33368 KB Output is correct
7 Correct 100 ms 33372 KB Output is correct
8 Correct 108 ms 33448 KB Output is correct
9 Correct 158 ms 33464 KB Output is correct
10 Correct 98 ms 33368 KB Output is correct
11 Correct 114 ms 33472 KB Output is correct
12 Correct 156 ms 33460 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4572 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 0 ms 4444 KB Output is correct
19 Correct 1 ms 4440 KB Output is correct
20 Correct 1 ms 4444 KB Output is correct
21 Correct 1 ms 4444 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4444 KB Output is correct
24 Correct 0 ms 4444 KB Output is correct
25 Correct 0 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 0 ms 4444 KB Output is correct
28 Correct 1 ms 4472 KB Output is correct
29 Correct 0 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 0 ms 4560 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 0 ms 4444 KB Output is correct
37 Correct 1 ms 4440 KB Output is correct
38 Correct 1 ms 4444 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 2 ms 8796 KB Output is correct
42 Correct 2 ms 8796 KB Output is correct
43 Correct 3 ms 8796 KB Output is correct
44 Correct 2 ms 8852 KB Output is correct
45 Correct 3 ms 8792 KB Output is correct
46 Correct 11 ms 8856 KB Output is correct
47 Correct 12 ms 8796 KB Output is correct
48 Correct 13 ms 8848 KB Output is correct
49 Correct 11 ms 8792 KB Output is correct
50 Correct 13 ms 8792 KB Output is correct
51 Correct 102 ms 33372 KB Output is correct
52 Correct 124 ms 33368 KB Output is correct
53 Correct 211 ms 33624 KB Output is correct
54 Correct 216 ms 33616 KB Output is correct
55 Correct 1 ms 4440 KB Output is correct
56 Correct 29 ms 8796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 29 ms 5956 KB Output is correct
3 Correct 30 ms 5968 KB Output is correct
4 Correct 23 ms 5976 KB Output is correct
5 Correct 32 ms 5900 KB Output is correct
6 Correct 23 ms 5976 KB Output is correct
7 Correct 34 ms 5980 KB Output is correct
8 Correct 0 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 0 ms 4444 KB Output is correct
11 Correct 1 ms 4444 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 0 ms 4444 KB Output is correct
16 Correct 0 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 29 ms 5956 KB Output is correct
3 Correct 30 ms 5968 KB Output is correct
4 Correct 23 ms 5976 KB Output is correct
5 Correct 32 ms 5900 KB Output is correct
6 Correct 23 ms 5976 KB Output is correct
7 Correct 34 ms 5980 KB Output is correct
8 Correct 0 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 0 ms 4444 KB Output is correct
11 Correct 1 ms 4444 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 0 ms 4444 KB Output is correct
16 Correct 0 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 134 ms 6048 KB Output is correct
21 Correct 112 ms 6092 KB Output is correct
22 Correct 121 ms 5972 KB Output is correct
23 Correct 96 ms 6228 KB Output is correct
24 Correct 99 ms 6048 KB Output is correct
25 Correct 142 ms 5928 KB Output is correct
26 Correct 124 ms 6004 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4532 KB Output is correct
29 Correct 1 ms 4448 KB Output is correct
30 Correct 1 ms 4448 KB Output is correct
31 Correct 0 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4452 KB Output is correct
34 Correct 1 ms 4476 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 0 ms 4444 KB Output is correct
38 Correct 1 ms 4452 KB Output is correct
39 Correct 1 ms 4448 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 0 ms 4444 KB Output is correct
42 Correct 0 ms 4444 KB Output is correct
43 Correct 1 ms 4440 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 29 ms 5956 KB Output is correct
3 Correct 30 ms 5968 KB Output is correct
4 Correct 23 ms 5976 KB Output is correct
5 Correct 32 ms 5900 KB Output is correct
6 Correct 23 ms 5976 KB Output is correct
7 Correct 34 ms 5980 KB Output is correct
8 Correct 0 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 0 ms 4444 KB Output is correct
11 Correct 1 ms 4444 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 0 ms 4444 KB Output is correct
16 Correct 0 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 134 ms 6048 KB Output is correct
21 Correct 112 ms 6092 KB Output is correct
22 Correct 121 ms 5972 KB Output is correct
23 Correct 96 ms 6228 KB Output is correct
24 Correct 99 ms 6048 KB Output is correct
25 Correct 142 ms 5928 KB Output is correct
26 Correct 124 ms 6004 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4532 KB Output is correct
29 Correct 1 ms 4448 KB Output is correct
30 Correct 1 ms 4448 KB Output is correct
31 Correct 0 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4452 KB Output is correct
34 Correct 1 ms 4476 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 0 ms 4444 KB Output is correct
38 Correct 1 ms 4452 KB Output is correct
39 Correct 1 ms 4448 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 0 ms 4444 KB Output is correct
42 Correct 0 ms 4444 KB Output is correct
43 Correct 1 ms 4440 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
46 Correct 1 ms 4440 KB Output is correct
47 Correct 162 ms 10380 KB Output is correct
48 Correct 149 ms 6244 KB Output is correct
49 Correct 149 ms 6224 KB Output is correct
50 Correct 134 ms 10580 KB Output is correct
51 Correct 132 ms 10320 KB Output is correct
52 Correct 164 ms 10220 KB Output is correct
53 Correct 173 ms 10632 KB Output is correct
54 Correct 2 ms 8796 KB Output is correct
55 Correct 3 ms 8792 KB Output is correct
56 Correct 3 ms 8796 KB Output is correct
57 Correct 3 ms 8792 KB Output is correct
58 Correct 2 ms 8796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 29 ms 5956 KB Output is correct
3 Correct 30 ms 5968 KB Output is correct
4 Correct 23 ms 5976 KB Output is correct
5 Correct 32 ms 5900 KB Output is correct
6 Correct 23 ms 5976 KB Output is correct
7 Correct 34 ms 5980 KB Output is correct
8 Correct 0 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 0 ms 4444 KB Output is correct
11 Correct 1 ms 4444 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 0 ms 4444 KB Output is correct
16 Correct 0 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 134 ms 6048 KB Output is correct
21 Correct 112 ms 6092 KB Output is correct
22 Correct 121 ms 5972 KB Output is correct
23 Correct 96 ms 6228 KB Output is correct
24 Correct 99 ms 6048 KB Output is correct
25 Correct 142 ms 5928 KB Output is correct
26 Correct 124 ms 6004 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4532 KB Output is correct
29 Correct 1 ms 4448 KB Output is correct
30 Correct 1 ms 4448 KB Output is correct
31 Correct 0 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4452 KB Output is correct
34 Correct 1 ms 4476 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 0 ms 4444 KB Output is correct
38 Correct 1 ms 4452 KB Output is correct
39 Correct 1 ms 4448 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 0 ms 4444 KB Output is correct
42 Correct 0 ms 4444 KB Output is correct
43 Correct 1 ms 4440 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
46 Correct 1 ms 4440 KB Output is correct
47 Correct 162 ms 10380 KB Output is correct
48 Correct 149 ms 6244 KB Output is correct
49 Correct 149 ms 6224 KB Output is correct
50 Correct 134 ms 10580 KB Output is correct
51 Correct 132 ms 10320 KB Output is correct
52 Correct 164 ms 10220 KB Output is correct
53 Correct 173 ms 10632 KB Output is correct
54 Correct 2 ms 8796 KB Output is correct
55 Correct 3 ms 8792 KB Output is correct
56 Correct 3 ms 8796 KB Output is correct
57 Correct 3 ms 8792 KB Output is correct
58 Correct 2 ms 8796 KB Output is correct
59 Correct 189 ms 10644 KB Output is correct
60 Correct 97 ms 9296 KB Output is correct
61 Correct 100 ms 9296 KB Output is correct
62 Correct 107 ms 9532 KB Output is correct
63 Correct 196 ms 10380 KB Output is correct
64 Correct 235 ms 10320 KB Output is correct
65 Correct 213 ms 10320 KB Output is correct
66 Correct 239 ms 10580 KB Output is correct
67 Correct 158 ms 10232 KB Output is correct
68 Correct 214 ms 10320 KB Output is correct
69 Correct 220 ms 10588 KB Output is correct
70 Correct 12 ms 9048 KB Output is correct
71 Correct 12 ms 8796 KB Output is correct
72 Correct 12 ms 8844 KB Output is correct
73 Correct 11 ms 8844 KB Output is correct
74 Correct 13 ms 8792 KB Output is correct
75 Correct 30 ms 8796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 4444 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 102 ms 33368 KB Output is correct
6 Correct 98 ms 33368 KB Output is correct
7 Correct 100 ms 33372 KB Output is correct
8 Correct 108 ms 33448 KB Output is correct
9 Correct 158 ms 33464 KB Output is correct
10 Correct 98 ms 33368 KB Output is correct
11 Correct 114 ms 33472 KB Output is correct
12 Correct 156 ms 33460 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 0 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4572 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 0 ms 4444 KB Output is correct
19 Correct 1 ms 4440 KB Output is correct
20 Correct 1 ms 4444 KB Output is correct
21 Correct 1 ms 4444 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4444 KB Output is correct
24 Correct 0 ms 4444 KB Output is correct
25 Correct 0 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 0 ms 4444 KB Output is correct
28 Correct 1 ms 4472 KB Output is correct
29 Correct 0 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 0 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 0 ms 4560 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 0 ms 4444 KB Output is correct
37 Correct 1 ms 4440 KB Output is correct
38 Correct 1 ms 4444 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 2 ms 8796 KB Output is correct
42 Correct 2 ms 8796 KB Output is correct
43 Correct 3 ms 8796 KB Output is correct
44 Correct 2 ms 8852 KB Output is correct
45 Correct 3 ms 8792 KB Output is correct
46 Correct 11 ms 8856 KB Output is correct
47 Correct 12 ms 8796 KB Output is correct
48 Correct 13 ms 8848 KB Output is correct
49 Correct 11 ms 8792 KB Output is correct
50 Correct 13 ms 8792 KB Output is correct
51 Correct 102 ms 33372 KB Output is correct
52 Correct 124 ms 33368 KB Output is correct
53 Correct 211 ms 33624 KB Output is correct
54 Correct 216 ms 33616 KB Output is correct
55 Correct 1 ms 4440 KB Output is correct
56 Correct 29 ms 8796 KB Output is correct
57 Correct 1 ms 4440 KB Output is correct
58 Correct 29 ms 5956 KB Output is correct
59 Correct 30 ms 5968 KB Output is correct
60 Correct 23 ms 5976 KB Output is correct
61 Correct 32 ms 5900 KB Output is correct
62 Correct 23 ms 5976 KB Output is correct
63 Correct 34 ms 5980 KB Output is correct
64 Correct 0 ms 4444 KB Output is correct
65 Correct 1 ms 4444 KB Output is correct
66 Correct 0 ms 4444 KB Output is correct
67 Correct 1 ms 4444 KB Output is correct
68 Correct 1 ms 4444 KB Output is correct
69 Correct 1 ms 4444 KB Output is correct
70 Correct 0 ms 4444 KB Output is correct
71 Correct 0 ms 4444 KB Output is correct
72 Correct 0 ms 4444 KB Output is correct
73 Correct 1 ms 4444 KB Output is correct
74 Correct 1 ms 4444 KB Output is correct
75 Correct 1 ms 4444 KB Output is correct
76 Correct 134 ms 6048 KB Output is correct
77 Correct 112 ms 6092 KB Output is correct
78 Correct 121 ms 5972 KB Output is correct
79 Correct 96 ms 6228 KB Output is correct
80 Correct 99 ms 6048 KB Output is correct
81 Correct 142 ms 5928 KB Output is correct
82 Correct 124 ms 6004 KB Output is correct
83 Correct 1 ms 4444 KB Output is correct
84 Correct 1 ms 4532 KB Output is correct
85 Correct 1 ms 4448 KB Output is correct
86 Correct 1 ms 4448 KB Output is correct
87 Correct 0 ms 4444 KB Output is correct
88 Correct 0 ms 4444 KB Output is correct
89 Correct 1 ms 4452 KB Output is correct
90 Correct 1 ms 4476 KB Output is correct
91 Correct 1 ms 4444 KB Output is correct
92 Correct 1 ms 4444 KB Output is correct
93 Correct 0 ms 4444 KB Output is correct
94 Correct 1 ms 4452 KB Output is correct
95 Correct 1 ms 4448 KB Output is correct
96 Correct 1 ms 4444 KB Output is correct
97 Correct 0 ms 4444 KB Output is correct
98 Correct 0 ms 4444 KB Output is correct
99 Correct 1 ms 4440 KB Output is correct
100 Correct 1 ms 4444 KB Output is correct
101 Correct 1 ms 4444 KB Output is correct
102 Correct 1 ms 4440 KB Output is correct
103 Correct 162 ms 10380 KB Output is correct
104 Correct 149 ms 6244 KB Output is correct
105 Correct 149 ms 6224 KB Output is correct
106 Correct 134 ms 10580 KB Output is correct
107 Correct 132 ms 10320 KB Output is correct
108 Correct 164 ms 10220 KB Output is correct
109 Correct 173 ms 10632 KB Output is correct
110 Correct 2 ms 8796 KB Output is correct
111 Correct 3 ms 8792 KB Output is correct
112 Correct 3 ms 8796 KB Output is correct
113 Correct 3 ms 8792 KB Output is correct
114 Correct 2 ms 8796 KB Output is correct
115 Correct 189 ms 10644 KB Output is correct
116 Correct 97 ms 9296 KB Output is correct
117 Correct 100 ms 9296 KB Output is correct
118 Correct 107 ms 9532 KB Output is correct
119 Correct 196 ms 10380 KB Output is correct
120 Correct 235 ms 10320 KB Output is correct
121 Correct 213 ms 10320 KB Output is correct
122 Correct 239 ms 10580 KB Output is correct
123 Correct 158 ms 10232 KB Output is correct
124 Correct 214 ms 10320 KB Output is correct
125 Correct 220 ms 10588 KB Output is correct
126 Correct 12 ms 9048 KB Output is correct
127 Correct 12 ms 8796 KB Output is correct
128 Correct 12 ms 8844 KB Output is correct
129 Correct 11 ms 8844 KB Output is correct
130 Correct 13 ms 8792 KB Output is correct
131 Correct 30 ms 8796 KB Output is correct
132 Correct 419 ms 46928 KB Output is correct
133 Correct 452 ms 46932 KB Output is correct
134 Correct 421 ms 46900 KB Output is correct
135 Correct 455 ms 46928 KB Output is correct
136 Correct 451 ms 46952 KB Output is correct
137 Correct 321 ms 33876 KB Output is correct
138 Correct 314 ms 34132 KB Output is correct
139 Correct 280 ms 46932 KB Output is correct
140 Correct 291 ms 46696 KB Output is correct
141 Correct 481 ms 46676 KB Output is correct
142 Correct 546 ms 46888 KB Output is correct