Submission #884510

# Submission time Handle Problem Language Result Execution time Memory
884510 2023-12-07T14:23:41 Z fanwen Council (JOI23_council) C++17
100 / 100
3332 ms 24912 KB
#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define ll long long
#define file(name)                  \
    if(fopen(name".inp", "r"))      \
        freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \

const int MAX = 3e5 + 5;

int n, m, a[MAX], num[25], Min[1 << 10][1 << 10], cnt[1 << 10][1 << 10];
vector <int> adj[1 << 10];

void you_make_it(void) {
	cin >> n >> m;
	for (int i = 1; i <= n; ++i) {
		for (int j = 0; j < m; ++j) {
			int x; cin >> x;
			if(x) a[i] |= (1 << j);
			num[j] += x;
		}
		adj[a[i] & ((1 << m / 2)  - 1)].push_back(a[i] >> (m / 2));	
	}    

	for (int x = 0; x < (1 << m / 2); ++x) {
		for (auto y : adj[x]) cnt[x][y]++;
		for (int y = 0; y < (1 << (m - m / 2)); ++y) {
			Min[x][y] = m + 1;
			for (auto k : adj[x]) {
				Min[x][y] = min(Min[x][y], __builtin_popcount(y & k));
			} 
		}
	}

	for (int i = 1; i <= n; ++i) {
		int res = 0, ans = 0, fir = a[i] & ((1 << (m / 2)) - 1), sec = a[i] >> (m / 2);
		for (int j = 0; j < m; ++j) {
			int total = num[j] - (a[i] >> j & 1);
			if(total > n / 2) ans++;
			else if(total == n / 2) res |= (1 << j);
		}

		int val = m + 1;

		for (int mask = 0; mask < (1 << m / 2); ++mask) {
			if(mask != fir) {
				val = min(val, __builtin_popcount(mask & res) + Min[mask][res >> (m / 2)]);
			} else {
				for (int tmp = 0; tmp < (1 << (m - m / 2)); ++tmp) {
					if(cnt[mask][tmp] and (tmp != sec or cnt[mask][tmp] > 1)) {
						val = min(val, __builtin_popcount(mask & res) + __builtin_popcount(tmp & (res >> (m / 2))));
					}
				}
			}
		}
		cout << ans + __builtin_popcount(res) - val << '\n';
	}

}

signed main() {

#ifdef LOCAL
    freopen("TASK.inp", "r", stdin);
    freopen("TASK.out", "w", stdout);
#endif
    file("council");
    auto start_time = chrono::steady_clock::now();

    cin.tie(0), cout.tie(0) -> sync_with_stdio(0);

    you_make_it();

    auto end_time = chrono::steady_clock::now();

    cerr << "\nExecution time : " << chrono::duration_cast <chrono::milliseconds> (end_time - start_time).count() << "[ms]" << endl;

    return (0 ^ 0);
}

// Dream it. Wish it. Do it.

Compilation message

council.cpp: In function 'int main()':
council.cpp:10:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |         freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
council.cpp:70:5: note: in expansion of macro 'file'
   70 |     file("council");
      |     ^~~~
council.cpp:10:49: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |         freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \
      |                                          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
council.cpp:70:5: note: in expansion of macro 'file'
   70 |     file("council");
      |     ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 4 ms 6492 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 6 ms 8732 KB Output is correct
10 Correct 2 ms 8792 KB Output is correct
11 Correct 2 ms 8792 KB Output is correct
12 Correct 6 ms 8540 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 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 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 1 ms 4444 KB Output is correct
25 Correct 1 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 4696 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4444 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 4556 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8540 KB Output is correct
43 Correct 2 ms 8540 KB Output is correct
44 Correct 1 ms 8536 KB Output is correct
45 Correct 1 ms 8540 KB Output is correct
46 Correct 1 ms 8540 KB Output is correct
47 Correct 1 ms 8540 KB Output is correct
48 Correct 2 ms 8536 KB Output is correct
49 Correct 1 ms 8536 KB Output is correct
50 Correct 1 ms 8540 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 4 ms 6492 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 6 ms 8732 KB Output is correct
10 Correct 2 ms 8792 KB Output is correct
11 Correct 2 ms 8792 KB Output is correct
12 Correct 6 ms 8540 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 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 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 1 ms 4444 KB Output is correct
25 Correct 1 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 4696 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4444 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 4556 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8540 KB Output is correct
43 Correct 2 ms 8540 KB Output is correct
44 Correct 1 ms 8536 KB Output is correct
45 Correct 1 ms 8540 KB Output is correct
46 Correct 1 ms 8540 KB Output is correct
47 Correct 1 ms 8540 KB Output is correct
48 Correct 2 ms 8536 KB Output is correct
49 Correct 1 ms 8536 KB Output is correct
50 Correct 1 ms 8540 KB Output is correct
51 Correct 27 ms 6492 KB Output is correct
52 Correct 30 ms 6672 KB Output is correct
53 Correct 28 ms 9052 KB Output is correct
54 Correct 28 ms 8792 KB Output is correct
55 Correct 1 ms 4444 KB Output is correct
56 Correct 12 ms 8692 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 54 ms 7936 KB Output is correct
3 Correct 51 ms 7460 KB Output is correct
4 Correct 47 ms 7880 KB Output is correct
5 Correct 62 ms 8524 KB Output is correct
6 Correct 43 ms 7880 KB Output is correct
7 Correct 59 ms 8552 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4444 KB Output is correct
11 Correct 1 ms 4440 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4588 KB Output is correct
17 Correct 2 ms 4444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 54 ms 7936 KB Output is correct
3 Correct 51 ms 7460 KB Output is correct
4 Correct 47 ms 7880 KB Output is correct
5 Correct 62 ms 8524 KB Output is correct
6 Correct 43 ms 7880 KB Output is correct
7 Correct 59 ms 8552 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4444 KB Output is correct
11 Correct 1 ms 4440 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4588 KB Output is correct
17 Correct 2 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4584 KB Output is correct
20 Correct 238 ms 13736 KB Output is correct
21 Correct 251 ms 13336 KB Output is correct
22 Correct 216 ms 13216 KB Output is correct
23 Correct 257 ms 13804 KB Output is correct
24 Correct 195 ms 12144 KB Output is correct
25 Correct 253 ms 14012 KB Output is correct
26 Correct 272 ms 13988 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4588 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 1 ms 4440 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4700 KB Output is correct
37 Correct 1 ms 4444 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 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 54 ms 7936 KB Output is correct
3 Correct 51 ms 7460 KB Output is correct
4 Correct 47 ms 7880 KB Output is correct
5 Correct 62 ms 8524 KB Output is correct
6 Correct 43 ms 7880 KB Output is correct
7 Correct 59 ms 8552 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4444 KB Output is correct
11 Correct 1 ms 4440 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4588 KB Output is correct
17 Correct 2 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4584 KB Output is correct
20 Correct 238 ms 13736 KB Output is correct
21 Correct 251 ms 13336 KB Output is correct
22 Correct 216 ms 13216 KB Output is correct
23 Correct 257 ms 13804 KB Output is correct
24 Correct 195 ms 12144 KB Output is correct
25 Correct 253 ms 14012 KB Output is correct
26 Correct 272 ms 13988 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4588 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 1 ms 4440 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4700 KB Output is correct
37 Correct 1 ms 4444 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 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
46 Correct 1 ms 8540 KB Output is correct
47 Correct 546 ms 20356 KB Output is correct
48 Correct 438 ms 19800 KB Output is correct
49 Correct 444 ms 19636 KB Output is correct
50 Correct 480 ms 20164 KB Output is correct
51 Correct 435 ms 16580 KB Output is correct
52 Correct 605 ms 20760 KB Output is correct
53 Correct 627 ms 20900 KB Output is correct
54 Correct 1 ms 8676 KB Output is correct
55 Correct 2 ms 8540 KB Output is correct
56 Correct 1 ms 8688 KB Output is correct
57 Correct 1 ms 8696 KB Output is correct
58 Correct 1 ms 8540 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 54 ms 7936 KB Output is correct
3 Correct 51 ms 7460 KB Output is correct
4 Correct 47 ms 7880 KB Output is correct
5 Correct 62 ms 8524 KB Output is correct
6 Correct 43 ms 7880 KB Output is correct
7 Correct 59 ms 8552 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4444 KB Output is correct
11 Correct 1 ms 4440 KB Output is correct
12 Correct 1 ms 4444 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 ms 4588 KB Output is correct
17 Correct 2 ms 4444 KB Output is correct
18 Correct 1 ms 4444 KB Output is correct
19 Correct 1 ms 4584 KB Output is correct
20 Correct 238 ms 13736 KB Output is correct
21 Correct 251 ms 13336 KB Output is correct
22 Correct 216 ms 13216 KB Output is correct
23 Correct 257 ms 13804 KB Output is correct
24 Correct 195 ms 12144 KB Output is correct
25 Correct 253 ms 14012 KB Output is correct
26 Correct 272 ms 13988 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4588 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 KB Output is correct
32 Correct 1 ms 4440 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4700 KB Output is correct
37 Correct 1 ms 4444 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 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
46 Correct 1 ms 8540 KB Output is correct
47 Correct 546 ms 20356 KB Output is correct
48 Correct 438 ms 19800 KB Output is correct
49 Correct 444 ms 19636 KB Output is correct
50 Correct 480 ms 20164 KB Output is correct
51 Correct 435 ms 16580 KB Output is correct
52 Correct 605 ms 20760 KB Output is correct
53 Correct 627 ms 20900 KB Output is correct
54 Correct 1 ms 8676 KB Output is correct
55 Correct 2 ms 8540 KB Output is correct
56 Correct 1 ms 8688 KB Output is correct
57 Correct 1 ms 8696 KB Output is correct
58 Correct 1 ms 8540 KB Output is correct
59 Correct 994 ms 21784 KB Output is correct
60 Correct 577 ms 13888 KB Output is correct
61 Correct 617 ms 14296 KB Output is correct
62 Correct 689 ms 14436 KB Output is correct
63 Correct 873 ms 22140 KB Output is correct
64 Correct 1258 ms 22368 KB Output is correct
65 Correct 1246 ms 22272 KB Output is correct
66 Correct 1024 ms 21756 KB Output is correct
67 Correct 1004 ms 18628 KB Output is correct
68 Correct 1609 ms 22784 KB Output is correct
69 Correct 1619 ms 23260 KB Output is correct
70 Correct 1 ms 8540 KB Output is correct
71 Correct 1 ms 8540 KB Output is correct
72 Correct 1 ms 8540 KB Output is correct
73 Correct 1 ms 8540 KB Output is correct
74 Correct 1 ms 8540 KB Output is correct
75 Correct 12 ms 9228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4440 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 4444 KB Output is correct
4 Correct 1 ms 4444 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 4 ms 6492 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 6 ms 8732 KB Output is correct
10 Correct 2 ms 8792 KB Output is correct
11 Correct 2 ms 8792 KB Output is correct
12 Correct 6 ms 8540 KB Output is correct
13 Correct 1 ms 4444 KB Output is correct
14 Correct 1 ms 4444 KB Output is correct
15 Correct 1 ms 4444 KB Output is correct
16 Correct 1 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 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 1 ms 4444 KB Output is correct
25 Correct 1 ms 4444 KB Output is correct
26 Correct 1 ms 4444 KB Output is correct
27 Correct 1 ms 4444 KB Output is correct
28 Correct 1 ms 4444 KB Output is correct
29 Correct 1 ms 4444 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 4696 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4444 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4444 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 4556 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8540 KB Output is correct
43 Correct 2 ms 8540 KB Output is correct
44 Correct 1 ms 8536 KB Output is correct
45 Correct 1 ms 8540 KB Output is correct
46 Correct 1 ms 8540 KB Output is correct
47 Correct 1 ms 8540 KB Output is correct
48 Correct 2 ms 8536 KB Output is correct
49 Correct 1 ms 8536 KB Output is correct
50 Correct 1 ms 8540 KB Output is correct
51 Correct 27 ms 6492 KB Output is correct
52 Correct 30 ms 6672 KB Output is correct
53 Correct 28 ms 9052 KB Output is correct
54 Correct 28 ms 8792 KB Output is correct
55 Correct 1 ms 4444 KB Output is correct
56 Correct 12 ms 8692 KB Output is correct
57 Correct 1 ms 4444 KB Output is correct
58 Correct 54 ms 7936 KB Output is correct
59 Correct 51 ms 7460 KB Output is correct
60 Correct 47 ms 7880 KB Output is correct
61 Correct 62 ms 8524 KB Output is correct
62 Correct 43 ms 7880 KB Output is correct
63 Correct 59 ms 8552 KB Output is correct
64 Correct 1 ms 4444 KB Output is correct
65 Correct 1 ms 4444 KB Output is correct
66 Correct 1 ms 4444 KB Output is correct
67 Correct 1 ms 4440 KB Output is correct
68 Correct 1 ms 4444 KB Output is correct
69 Correct 1 ms 4444 KB Output is correct
70 Correct 1 ms 4444 KB Output is correct
71 Correct 1 ms 4444 KB Output is correct
72 Correct 1 ms 4588 KB Output is correct
73 Correct 2 ms 4444 KB Output is correct
74 Correct 1 ms 4444 KB Output is correct
75 Correct 1 ms 4584 KB Output is correct
76 Correct 238 ms 13736 KB Output is correct
77 Correct 251 ms 13336 KB Output is correct
78 Correct 216 ms 13216 KB Output is correct
79 Correct 257 ms 13804 KB Output is correct
80 Correct 195 ms 12144 KB Output is correct
81 Correct 253 ms 14012 KB Output is correct
82 Correct 272 ms 13988 KB Output is correct
83 Correct 1 ms 4440 KB Output is correct
84 Correct 1 ms 4444 KB Output is correct
85 Correct 1 ms 4588 KB Output is correct
86 Correct 1 ms 4444 KB Output is correct
87 Correct 1 ms 4444 KB Output is correct
88 Correct 1 ms 4440 KB Output is correct
89 Correct 1 ms 4444 KB Output is correct
90 Correct 1 ms 4444 KB Output is correct
91 Correct 1 ms 4444 KB Output is correct
92 Correct 1 ms 4700 KB Output is correct
93 Correct 1 ms 4444 KB Output is correct
94 Correct 1 ms 4444 KB Output is correct
95 Correct 1 ms 4444 KB Output is correct
96 Correct 1 ms 4444 KB Output is correct
97 Correct 1 ms 4444 KB Output is correct
98 Correct 1 ms 4444 KB Output is correct
99 Correct 1 ms 4444 KB Output is correct
100 Correct 1 ms 4444 KB Output is correct
101 Correct 1 ms 4700 KB Output is correct
102 Correct 1 ms 8540 KB Output is correct
103 Correct 546 ms 20356 KB Output is correct
104 Correct 438 ms 19800 KB Output is correct
105 Correct 444 ms 19636 KB Output is correct
106 Correct 480 ms 20164 KB Output is correct
107 Correct 435 ms 16580 KB Output is correct
108 Correct 605 ms 20760 KB Output is correct
109 Correct 627 ms 20900 KB Output is correct
110 Correct 1 ms 8676 KB Output is correct
111 Correct 2 ms 8540 KB Output is correct
112 Correct 1 ms 8688 KB Output is correct
113 Correct 1 ms 8696 KB Output is correct
114 Correct 1 ms 8540 KB Output is correct
115 Correct 994 ms 21784 KB Output is correct
116 Correct 577 ms 13888 KB Output is correct
117 Correct 617 ms 14296 KB Output is correct
118 Correct 689 ms 14436 KB Output is correct
119 Correct 873 ms 22140 KB Output is correct
120 Correct 1258 ms 22368 KB Output is correct
121 Correct 1246 ms 22272 KB Output is correct
122 Correct 1024 ms 21756 KB Output is correct
123 Correct 1004 ms 18628 KB Output is correct
124 Correct 1609 ms 22784 KB Output is correct
125 Correct 1619 ms 23260 KB Output is correct
126 Correct 1 ms 8540 KB Output is correct
127 Correct 1 ms 8540 KB Output is correct
128 Correct 1 ms 8540 KB Output is correct
129 Correct 1 ms 8540 KB Output is correct
130 Correct 1 ms 8540 KB Output is correct
131 Correct 12 ms 9228 KB Output is correct
132 Correct 2854 ms 24204 KB Output is correct
133 Correct 2836 ms 24160 KB Output is correct
134 Correct 3050 ms 24184 KB Output is correct
135 Correct 2738 ms 24268 KB Output is correct
136 Correct 2922 ms 24324 KB Output is correct
137 Correct 2343 ms 23588 KB Output is correct
138 Correct 2293 ms 23760 KB Output is correct
139 Correct 2379 ms 21580 KB Output is correct
140 Correct 2260 ms 20204 KB Output is correct
141 Correct 3262 ms 24616 KB Output is correct
142 Correct 3332 ms 24912 KB Output is correct