Submission #777729

# Submission time Handle Problem Language Result Execution time Memory
777729 2023-07-09T14:26:18 Z tch1cherin Council (JOI23_council) C++17
100 / 100
2675 ms 35140 KB
#include <bits/stdc++.h>
using namespace std;

const int N = 20, C = sqrt(300000);
int c[2][1 << (N / 2)][1 << (N / 2)], ans[1 << N] = {}, cnt[N] = {};
vector<int> go[2][1 << (N / 2)];
int occ[1 << N] = {}, a[1 << N];

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  auto fhalf = [](int x) { return x & ((1 << (N / 2)) - 1); };
  auto shalf = [](int x) { return x >> (N / 2); };
  auto concat = [](int x, int y) { return (x << (N / 2)) + y; };
  for (int i = 0; i < n; i++) {
    int mask = 0;
    for (int j = 0; j < m; j++) {
      int x;
      cin >> x;
      if (x == 1) {
        cnt[j]++;
      }
      mask += x << j;
    }
    occ[mask]++;
    go[0][fhalf(mask)].push_back(shalf(mask));
    go[1][shalf(mask)].push_back(fhalf(mask));
    a[i] = mask;
  }
  for (int i = 0; i < (1 << (N / 2)); i++) {
    for (int j = 0; j < 2; j++) {
      sort(go[0][i].begin(), go[0][i].end());
      go[0][i].resize(unique(go[0][i].begin(), go[0][i].end()) - go[0][i].begin());
    }
  }
  for (int i = 0; i < (1 << (N / 2)); i++) {
    for (int j = 0; j < (1 << (N / 2)); j++) {
      for (int k = 0; k < N / 2; k++) {
        if (cnt[k] - ((i >> k) & 1) - ((j >> k) & 1) < n / 2) {
          c[0][i][j]++;
        }
        if (cnt[k + N / 2] - ((i >> k) & 1) - ((j >> k) & 1) < n / 2) {
          c[1][i][j]++;
        }
      }
    }
  }
  fill(ans, ans + (1 << N), 2e9);
  for (int u = 0; u < (1 << (N / 2)); u++) {
    for (int v = 0; v < (1 << (N / 2)); v++) {
      int optX = 1e9, optY = 1e9;
      for (int w : go[0][u]) {
        if (w != v) {
          optX = min(optX, c[1][v][w]);
        }
      }
      for (int w : go[1][v]) {
        if (w != u) {
          optY = min(optY, c[0][u][w]);
        }
        int cc = concat(v, w);
        ans[cc] = min(ans[cc], c[0][u][w] + optX);
      }
      for (int w : go[0][u]) {
        int cc = concat(w, u);
        ans[cc] = min(ans[cc], c[1][v][w] + optY);
      }
      int CC = concat(v, u);
      if (occ[CC] > 1) {
        ans[CC] = min(ans[CC], c[0][u][u] + c[1][v][v]);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << max(0, N - ans[a[i]]) << "\n";
  }
}
# Verdict Execution time Memory Grader output
1 Correct 49 ms 12580 KB Output is correct
2 Correct 43 ms 12600 KB Output is correct
3 Correct 51 ms 12580 KB Output is correct
4 Correct 49 ms 12628 KB Output is correct
5 Correct 44 ms 12592 KB Output is correct
6 Correct 23 ms 4492 KB Output is correct
7 Correct 36 ms 12712 KB Output is correct
8 Correct 32 ms 12756 KB Output is correct
9 Correct 38 ms 13764 KB Output is correct
10 Correct 44 ms 12628 KB Output is correct
11 Correct 47 ms 12684 KB Output is correct
12 Correct 57 ms 13752 KB Output is correct
13 Correct 52 ms 12668 KB Output is correct
14 Correct 51 ms 12588 KB Output is correct
15 Correct 52 ms 12664 KB Output is correct
16 Correct 52 ms 12676 KB Output is correct
17 Correct 53 ms 12644 KB Output is correct
18 Correct 52 ms 12684 KB Output is correct
19 Correct 49 ms 12640 KB Output is correct
20 Correct 49 ms 12632 KB Output is correct
21 Correct 52 ms 12596 KB Output is correct
22 Correct 51 ms 12684 KB Output is correct
23 Correct 48 ms 12556 KB Output is correct
24 Correct 46 ms 12684 KB Output is correct
25 Correct 43 ms 12664 KB Output is correct
26 Correct 55 ms 12640 KB Output is correct
27 Correct 51 ms 12620 KB Output is correct
28 Correct 47 ms 12596 KB Output is correct
29 Correct 47 ms 12676 KB Output is correct
30 Correct 49 ms 12596 KB Output is correct
31 Correct 50 ms 12620 KB Output is correct
32 Correct 48 ms 12604 KB Output is correct
33 Correct 52 ms 12636 KB Output is correct
34 Correct 47 ms 12604 KB Output is correct
35 Correct 48 ms 12588 KB Output is correct
36 Correct 47 ms 12560 KB Output is correct
37 Correct 42 ms 12660 KB Output is correct
38 Correct 47 ms 12660 KB Output is correct
39 Correct 47 ms 12592 KB Output is correct
40 Correct 47 ms 12636 KB Output is correct
41 Correct 48 ms 12636 KB Output is correct
42 Correct 39 ms 12592 KB Output is correct
43 Correct 42 ms 12732 KB Output is correct
44 Correct 45 ms 12692 KB Output is correct
45 Correct 38 ms 12724 KB Output is correct
46 Correct 48 ms 12696 KB Output is correct
47 Correct 36 ms 12660 KB Output is correct
48 Correct 32 ms 12752 KB Output is correct
49 Correct 42 ms 12664 KB Output is correct
50 Correct 55 ms 12672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 49 ms 12580 KB Output is correct
2 Correct 43 ms 12600 KB Output is correct
3 Correct 51 ms 12580 KB Output is correct
4 Correct 49 ms 12628 KB Output is correct
5 Correct 44 ms 12592 KB Output is correct
6 Correct 23 ms 4492 KB Output is correct
7 Correct 36 ms 12712 KB Output is correct
8 Correct 32 ms 12756 KB Output is correct
9 Correct 38 ms 13764 KB Output is correct
10 Correct 44 ms 12628 KB Output is correct
11 Correct 47 ms 12684 KB Output is correct
12 Correct 57 ms 13752 KB Output is correct
13 Correct 52 ms 12668 KB Output is correct
14 Correct 51 ms 12588 KB Output is correct
15 Correct 52 ms 12664 KB Output is correct
16 Correct 52 ms 12676 KB Output is correct
17 Correct 53 ms 12644 KB Output is correct
18 Correct 52 ms 12684 KB Output is correct
19 Correct 49 ms 12640 KB Output is correct
20 Correct 49 ms 12632 KB Output is correct
21 Correct 52 ms 12596 KB Output is correct
22 Correct 51 ms 12684 KB Output is correct
23 Correct 48 ms 12556 KB Output is correct
24 Correct 46 ms 12684 KB Output is correct
25 Correct 43 ms 12664 KB Output is correct
26 Correct 55 ms 12640 KB Output is correct
27 Correct 51 ms 12620 KB Output is correct
28 Correct 47 ms 12596 KB Output is correct
29 Correct 47 ms 12676 KB Output is correct
30 Correct 49 ms 12596 KB Output is correct
31 Correct 50 ms 12620 KB Output is correct
32 Correct 48 ms 12604 KB Output is correct
33 Correct 52 ms 12636 KB Output is correct
34 Correct 47 ms 12604 KB Output is correct
35 Correct 48 ms 12588 KB Output is correct
36 Correct 47 ms 12560 KB Output is correct
37 Correct 42 ms 12660 KB Output is correct
38 Correct 47 ms 12660 KB Output is correct
39 Correct 47 ms 12592 KB Output is correct
40 Correct 47 ms 12636 KB Output is correct
41 Correct 48 ms 12636 KB Output is correct
42 Correct 39 ms 12592 KB Output is correct
43 Correct 42 ms 12732 KB Output is correct
44 Correct 45 ms 12692 KB Output is correct
45 Correct 38 ms 12724 KB Output is correct
46 Correct 48 ms 12696 KB Output is correct
47 Correct 36 ms 12660 KB Output is correct
48 Correct 32 ms 12752 KB Output is correct
49 Correct 42 ms 12664 KB Output is correct
50 Correct 55 ms 12672 KB Output is correct
51 Correct 34 ms 4680 KB Output is correct
52 Correct 67 ms 12816 KB Output is correct
53 Correct 103 ms 16812 KB Output is correct
54 Correct 90 ms 16684 KB Output is correct
55 Correct 56 ms 12704 KB Output is correct
56 Correct 65 ms 13288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 12616 KB Output is correct
2 Correct 1046 ms 18124 KB Output is correct
3 Correct 1042 ms 18120 KB Output is correct
4 Correct 680 ms 18348 KB Output is correct
5 Correct 620 ms 18796 KB Output is correct
6 Correct 672 ms 17520 KB Output is correct
7 Correct 623 ms 18884 KB Output is correct
8 Correct 53 ms 12632 KB Output is correct
9 Correct 51 ms 12572 KB Output is correct
10 Correct 49 ms 12620 KB Output is correct
11 Correct 52 ms 12684 KB Output is correct
12 Correct 54 ms 12576 KB Output is correct
13 Correct 53 ms 12664 KB Output is correct
14 Correct 50 ms 12620 KB Output is correct
15 Correct 50 ms 12672 KB Output is correct
16 Correct 53 ms 12628 KB Output is correct
17 Correct 56 ms 12716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 12616 KB Output is correct
2 Correct 1046 ms 18124 KB Output is correct
3 Correct 1042 ms 18120 KB Output is correct
4 Correct 680 ms 18348 KB Output is correct
5 Correct 620 ms 18796 KB Output is correct
6 Correct 672 ms 17520 KB Output is correct
7 Correct 623 ms 18884 KB Output is correct
8 Correct 53 ms 12632 KB Output is correct
9 Correct 51 ms 12572 KB Output is correct
10 Correct 49 ms 12620 KB Output is correct
11 Correct 52 ms 12684 KB Output is correct
12 Correct 54 ms 12576 KB Output is correct
13 Correct 53 ms 12664 KB Output is correct
14 Correct 50 ms 12620 KB Output is correct
15 Correct 50 ms 12672 KB Output is correct
16 Correct 53 ms 12628 KB Output is correct
17 Correct 56 ms 12716 KB Output is correct
18 Correct 48 ms 12648 KB Output is correct
19 Correct 51 ms 12620 KB Output is correct
20 Correct 690 ms 23736 KB Output is correct
21 Correct 672 ms 23032 KB Output is correct
22 Correct 674 ms 23008 KB Output is correct
23 Correct 1101 ms 19252 KB Output is correct
24 Correct 1151 ms 22812 KB Output is correct
25 Correct 697 ms 23728 KB Output is correct
26 Correct 689 ms 23736 KB Output is correct
27 Correct 47 ms 12664 KB Output is correct
28 Correct 48 ms 12580 KB Output is correct
29 Correct 45 ms 12580 KB Output is correct
30 Correct 43 ms 12600 KB Output is correct
31 Correct 49 ms 12596 KB Output is correct
32 Correct 50 ms 12568 KB Output is correct
33 Correct 48 ms 12680 KB Output is correct
34 Correct 49 ms 12596 KB Output is correct
35 Correct 48 ms 12620 KB Output is correct
36 Correct 46 ms 12708 KB Output is correct
37 Correct 46 ms 12588 KB Output is correct
38 Correct 48 ms 12648 KB Output is correct
39 Correct 48 ms 12568 KB Output is correct
40 Correct 50 ms 12620 KB Output is correct
41 Correct 49 ms 12620 KB Output is correct
42 Correct 42 ms 12592 KB Output is correct
43 Correct 43 ms 12636 KB Output is correct
44 Correct 44 ms 12596 KB Output is correct
45 Correct 42 ms 12676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 12616 KB Output is correct
2 Correct 1046 ms 18124 KB Output is correct
3 Correct 1042 ms 18120 KB Output is correct
4 Correct 680 ms 18348 KB Output is correct
5 Correct 620 ms 18796 KB Output is correct
6 Correct 672 ms 17520 KB Output is correct
7 Correct 623 ms 18884 KB Output is correct
8 Correct 53 ms 12632 KB Output is correct
9 Correct 51 ms 12572 KB Output is correct
10 Correct 49 ms 12620 KB Output is correct
11 Correct 52 ms 12684 KB Output is correct
12 Correct 54 ms 12576 KB Output is correct
13 Correct 53 ms 12664 KB Output is correct
14 Correct 50 ms 12620 KB Output is correct
15 Correct 50 ms 12672 KB Output is correct
16 Correct 53 ms 12628 KB Output is correct
17 Correct 56 ms 12716 KB Output is correct
18 Correct 48 ms 12648 KB Output is correct
19 Correct 51 ms 12620 KB Output is correct
20 Correct 690 ms 23736 KB Output is correct
21 Correct 672 ms 23032 KB Output is correct
22 Correct 674 ms 23008 KB Output is correct
23 Correct 1101 ms 19252 KB Output is correct
24 Correct 1151 ms 22812 KB Output is correct
25 Correct 697 ms 23728 KB Output is correct
26 Correct 689 ms 23736 KB Output is correct
27 Correct 47 ms 12664 KB Output is correct
28 Correct 48 ms 12580 KB Output is correct
29 Correct 45 ms 12580 KB Output is correct
30 Correct 43 ms 12600 KB Output is correct
31 Correct 49 ms 12596 KB Output is correct
32 Correct 50 ms 12568 KB Output is correct
33 Correct 48 ms 12680 KB Output is correct
34 Correct 49 ms 12596 KB Output is correct
35 Correct 48 ms 12620 KB Output is correct
36 Correct 46 ms 12708 KB Output is correct
37 Correct 46 ms 12588 KB Output is correct
38 Correct 48 ms 12648 KB Output is correct
39 Correct 48 ms 12568 KB Output is correct
40 Correct 50 ms 12620 KB Output is correct
41 Correct 49 ms 12620 KB Output is correct
42 Correct 42 ms 12592 KB Output is correct
43 Correct 43 ms 12636 KB Output is correct
44 Correct 44 ms 12596 KB Output is correct
45 Correct 42 ms 12676 KB Output is correct
46 Correct 42 ms 12620 KB Output is correct
47 Correct 797 ms 26188 KB Output is correct
48 Correct 758 ms 25560 KB Output is correct
49 Correct 789 ms 25368 KB Output is correct
50 Correct 1172 ms 21440 KB Output is correct
51 Correct 1202 ms 25184 KB Output is correct
52 Correct 860 ms 26392 KB Output is correct
53 Correct 883 ms 26664 KB Output is correct
54 Correct 57 ms 12580 KB Output is correct
55 Correct 37 ms 12664 KB Output is correct
56 Correct 47 ms 12712 KB Output is correct
57 Correct 44 ms 12672 KB Output is correct
58 Correct 39 ms 12720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 12616 KB Output is correct
2 Correct 1046 ms 18124 KB Output is correct
3 Correct 1042 ms 18120 KB Output is correct
4 Correct 680 ms 18348 KB Output is correct
5 Correct 620 ms 18796 KB Output is correct
6 Correct 672 ms 17520 KB Output is correct
7 Correct 623 ms 18884 KB Output is correct
8 Correct 53 ms 12632 KB Output is correct
9 Correct 51 ms 12572 KB Output is correct
10 Correct 49 ms 12620 KB Output is correct
11 Correct 52 ms 12684 KB Output is correct
12 Correct 54 ms 12576 KB Output is correct
13 Correct 53 ms 12664 KB Output is correct
14 Correct 50 ms 12620 KB Output is correct
15 Correct 50 ms 12672 KB Output is correct
16 Correct 53 ms 12628 KB Output is correct
17 Correct 56 ms 12716 KB Output is correct
18 Correct 48 ms 12648 KB Output is correct
19 Correct 51 ms 12620 KB Output is correct
20 Correct 690 ms 23736 KB Output is correct
21 Correct 672 ms 23032 KB Output is correct
22 Correct 674 ms 23008 KB Output is correct
23 Correct 1101 ms 19252 KB Output is correct
24 Correct 1151 ms 22812 KB Output is correct
25 Correct 697 ms 23728 KB Output is correct
26 Correct 689 ms 23736 KB Output is correct
27 Correct 47 ms 12664 KB Output is correct
28 Correct 48 ms 12580 KB Output is correct
29 Correct 45 ms 12580 KB Output is correct
30 Correct 43 ms 12600 KB Output is correct
31 Correct 49 ms 12596 KB Output is correct
32 Correct 50 ms 12568 KB Output is correct
33 Correct 48 ms 12680 KB Output is correct
34 Correct 49 ms 12596 KB Output is correct
35 Correct 48 ms 12620 KB Output is correct
36 Correct 46 ms 12708 KB Output is correct
37 Correct 46 ms 12588 KB Output is correct
38 Correct 48 ms 12648 KB Output is correct
39 Correct 48 ms 12568 KB Output is correct
40 Correct 50 ms 12620 KB Output is correct
41 Correct 49 ms 12620 KB Output is correct
42 Correct 42 ms 12592 KB Output is correct
43 Correct 43 ms 12636 KB Output is correct
44 Correct 44 ms 12596 KB Output is correct
45 Correct 42 ms 12676 KB Output is correct
46 Correct 42 ms 12620 KB Output is correct
47 Correct 797 ms 26188 KB Output is correct
48 Correct 758 ms 25560 KB Output is correct
49 Correct 789 ms 25368 KB Output is correct
50 Correct 1172 ms 21440 KB Output is correct
51 Correct 1202 ms 25184 KB Output is correct
52 Correct 860 ms 26392 KB Output is correct
53 Correct 883 ms 26664 KB Output is correct
54 Correct 57 ms 12580 KB Output is correct
55 Correct 37 ms 12664 KB Output is correct
56 Correct 47 ms 12712 KB Output is correct
57 Correct 44 ms 12672 KB Output is correct
58 Correct 39 ms 12720 KB Output is correct
59 Correct 1060 ms 23796 KB Output is correct
60 Correct 1191 ms 18740 KB Output is correct
61 Correct 1248 ms 19120 KB Output is correct
62 Correct 1316 ms 19296 KB Output is correct
63 Correct 875 ms 27480 KB Output is correct
64 Correct 987 ms 28452 KB Output is correct
65 Correct 965 ms 28540 KB Output is correct
66 Correct 1190 ms 23208 KB Output is correct
67 Correct 1243 ms 26912 KB Output is correct
68 Correct 1681 ms 29184 KB Output is correct
69 Correct 1690 ms 29572 KB Output is correct
70 Correct 46 ms 12704 KB Output is correct
71 Correct 34 ms 12620 KB Output is correct
72 Correct 31 ms 12748 KB Output is correct
73 Correct 42 ms 12580 KB Output is correct
74 Correct 46 ms 12668 KB Output is correct
75 Correct 66 ms 13260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 49 ms 12580 KB Output is correct
2 Correct 43 ms 12600 KB Output is correct
3 Correct 51 ms 12580 KB Output is correct
4 Correct 49 ms 12628 KB Output is correct
5 Correct 44 ms 12592 KB Output is correct
6 Correct 23 ms 4492 KB Output is correct
7 Correct 36 ms 12712 KB Output is correct
8 Correct 32 ms 12756 KB Output is correct
9 Correct 38 ms 13764 KB Output is correct
10 Correct 44 ms 12628 KB Output is correct
11 Correct 47 ms 12684 KB Output is correct
12 Correct 57 ms 13752 KB Output is correct
13 Correct 52 ms 12668 KB Output is correct
14 Correct 51 ms 12588 KB Output is correct
15 Correct 52 ms 12664 KB Output is correct
16 Correct 52 ms 12676 KB Output is correct
17 Correct 53 ms 12644 KB Output is correct
18 Correct 52 ms 12684 KB Output is correct
19 Correct 49 ms 12640 KB Output is correct
20 Correct 49 ms 12632 KB Output is correct
21 Correct 52 ms 12596 KB Output is correct
22 Correct 51 ms 12684 KB Output is correct
23 Correct 48 ms 12556 KB Output is correct
24 Correct 46 ms 12684 KB Output is correct
25 Correct 43 ms 12664 KB Output is correct
26 Correct 55 ms 12640 KB Output is correct
27 Correct 51 ms 12620 KB Output is correct
28 Correct 47 ms 12596 KB Output is correct
29 Correct 47 ms 12676 KB Output is correct
30 Correct 49 ms 12596 KB Output is correct
31 Correct 50 ms 12620 KB Output is correct
32 Correct 48 ms 12604 KB Output is correct
33 Correct 52 ms 12636 KB Output is correct
34 Correct 47 ms 12604 KB Output is correct
35 Correct 48 ms 12588 KB Output is correct
36 Correct 47 ms 12560 KB Output is correct
37 Correct 42 ms 12660 KB Output is correct
38 Correct 47 ms 12660 KB Output is correct
39 Correct 47 ms 12592 KB Output is correct
40 Correct 47 ms 12636 KB Output is correct
41 Correct 48 ms 12636 KB Output is correct
42 Correct 39 ms 12592 KB Output is correct
43 Correct 42 ms 12732 KB Output is correct
44 Correct 45 ms 12692 KB Output is correct
45 Correct 38 ms 12724 KB Output is correct
46 Correct 48 ms 12696 KB Output is correct
47 Correct 36 ms 12660 KB Output is correct
48 Correct 32 ms 12752 KB Output is correct
49 Correct 42 ms 12664 KB Output is correct
50 Correct 55 ms 12672 KB Output is correct
51 Correct 34 ms 4680 KB Output is correct
52 Correct 67 ms 12816 KB Output is correct
53 Correct 103 ms 16812 KB Output is correct
54 Correct 90 ms 16684 KB Output is correct
55 Correct 56 ms 12704 KB Output is correct
56 Correct 65 ms 13288 KB Output is correct
57 Correct 53 ms 12616 KB Output is correct
58 Correct 1046 ms 18124 KB Output is correct
59 Correct 1042 ms 18120 KB Output is correct
60 Correct 680 ms 18348 KB Output is correct
61 Correct 620 ms 18796 KB Output is correct
62 Correct 672 ms 17520 KB Output is correct
63 Correct 623 ms 18884 KB Output is correct
64 Correct 53 ms 12632 KB Output is correct
65 Correct 51 ms 12572 KB Output is correct
66 Correct 49 ms 12620 KB Output is correct
67 Correct 52 ms 12684 KB Output is correct
68 Correct 54 ms 12576 KB Output is correct
69 Correct 53 ms 12664 KB Output is correct
70 Correct 50 ms 12620 KB Output is correct
71 Correct 50 ms 12672 KB Output is correct
72 Correct 53 ms 12628 KB Output is correct
73 Correct 56 ms 12716 KB Output is correct
74 Correct 48 ms 12648 KB Output is correct
75 Correct 51 ms 12620 KB Output is correct
76 Correct 690 ms 23736 KB Output is correct
77 Correct 672 ms 23032 KB Output is correct
78 Correct 674 ms 23008 KB Output is correct
79 Correct 1101 ms 19252 KB Output is correct
80 Correct 1151 ms 22812 KB Output is correct
81 Correct 697 ms 23728 KB Output is correct
82 Correct 689 ms 23736 KB Output is correct
83 Correct 47 ms 12664 KB Output is correct
84 Correct 48 ms 12580 KB Output is correct
85 Correct 45 ms 12580 KB Output is correct
86 Correct 43 ms 12600 KB Output is correct
87 Correct 49 ms 12596 KB Output is correct
88 Correct 50 ms 12568 KB Output is correct
89 Correct 48 ms 12680 KB Output is correct
90 Correct 49 ms 12596 KB Output is correct
91 Correct 48 ms 12620 KB Output is correct
92 Correct 46 ms 12708 KB Output is correct
93 Correct 46 ms 12588 KB Output is correct
94 Correct 48 ms 12648 KB Output is correct
95 Correct 48 ms 12568 KB Output is correct
96 Correct 50 ms 12620 KB Output is correct
97 Correct 49 ms 12620 KB Output is correct
98 Correct 42 ms 12592 KB Output is correct
99 Correct 43 ms 12636 KB Output is correct
100 Correct 44 ms 12596 KB Output is correct
101 Correct 42 ms 12676 KB Output is correct
102 Correct 42 ms 12620 KB Output is correct
103 Correct 797 ms 26188 KB Output is correct
104 Correct 758 ms 25560 KB Output is correct
105 Correct 789 ms 25368 KB Output is correct
106 Correct 1172 ms 21440 KB Output is correct
107 Correct 1202 ms 25184 KB Output is correct
108 Correct 860 ms 26392 KB Output is correct
109 Correct 883 ms 26664 KB Output is correct
110 Correct 57 ms 12580 KB Output is correct
111 Correct 37 ms 12664 KB Output is correct
112 Correct 47 ms 12712 KB Output is correct
113 Correct 44 ms 12672 KB Output is correct
114 Correct 39 ms 12720 KB Output is correct
115 Correct 1060 ms 23796 KB Output is correct
116 Correct 1191 ms 18740 KB Output is correct
117 Correct 1248 ms 19120 KB Output is correct
118 Correct 1316 ms 19296 KB Output is correct
119 Correct 875 ms 27480 KB Output is correct
120 Correct 987 ms 28452 KB Output is correct
121 Correct 965 ms 28540 KB Output is correct
122 Correct 1190 ms 23208 KB Output is correct
123 Correct 1243 ms 26912 KB Output is correct
124 Correct 1681 ms 29184 KB Output is correct
125 Correct 1690 ms 29572 KB Output is correct
126 Correct 46 ms 12704 KB Output is correct
127 Correct 34 ms 12620 KB Output is correct
128 Correct 31 ms 12748 KB Output is correct
129 Correct 42 ms 12580 KB Output is correct
130 Correct 46 ms 12668 KB Output is correct
131 Correct 66 ms 13260 KB Output is correct
132 Correct 2473 ms 34180 KB Output is correct
133 Correct 2557 ms 33904 KB Output is correct
134 Correct 2675 ms 34060 KB Output is correct
135 Correct 2021 ms 34124 KB Output is correct
136 Correct 1843 ms 34372 KB Output is correct
137 Correct 1415 ms 31504 KB Output is correct
138 Correct 1445 ms 31672 KB Output is correct
139 Correct 1218 ms 20864 KB Output is correct
140 Correct 1251 ms 28712 KB Output is correct
141 Correct 2488 ms 34728 KB Output is correct
142 Correct 2667 ms 35140 KB Output is correct