답안 #1077836

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1077836 2024-08-27T09:32:49 Z NeroZein Council (JOI23_council) C++17
100 / 100
1163 ms 72892 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, m;
	cin >> n >> m;
	vector<vector<int>> a(n + 1, vector<int>(m));
	for (int i = 1; i <= n; ++i) {
		for (int j = 0; j < m; ++j) {
			cin >> a[i][j];
		}
	}
	vector<int> attainable(1 << m);
	vector<int> attainable2(1 << m);
	for (int i = 1; i <= n; ++i) {
		int mask = 0;
		for (int j = 0; j < m; ++j) {
			mask |= (1 << j) * a[i][j];
		}
		if (!attainable[mask]) {
			attainable[mask] = i;			
		} else {
			attainable2[mask] = i; 
		}
	}
	
	for (int j = 0; j < m; ++j) {
		for (int mask = 0; mask < (1 << m); ++mask) {
			if (!(mask >> j & 1)) {
				continue; 
			}
			int cfrom = attainable[mask];
			int cfrom2 = attainable2[mask];
			
			if (cfrom == 0) {
				attainable[mask] = attainable[mask ^ (1 << j)];
				attainable2[mask] = attainable2[mask ^ (1 << j)];
			} else if (cfrom2 == 0) {
				attainable2[mask] = attainable[mask ^ (1 << j)];
			}
			assert(attainable[mask] == 0 || attainable[mask] != attainable2[mask]);
		}
	}
	vector<pair<int, int>> dp(1 << m);
	vector<pair<int, int>> dp2(1 << m);
	
	for (int mask = 0; mask < (1 << m); ++mask) {
		if (attainable[mask]) {
			dp[mask] = {mask, attainable[mask]};			
		} else {
			dp[mask] = {(1 << m) - 1, 0};
		}
		if (attainable2[mask]) {
			dp2[mask] = {mask, attainable2[mask]};			
		} else {
			dp2[mask] = {(1 << m) - 1, 0};
		}
	}
	
	for (int j = 0; j < m; ++j) {
		for (int mask = 0; mask < (1 << m); ++mask) {
			if (mask >> j & 1) {
				continue; 
			}
			vector<pair<int, int>> vec = {dp[mask], dp2[mask], dp[mask | (1 << j)], dp2[mask | (1 << j)]};
			sort(vec.begin(), vec.end(), [&](pair<int, int>& x, pair<int, int>& y) {
				return __builtin_popcount(x.first) < __builtin_popcount(y.first); 
			});
			dp[mask] = vec[0];
			//~ cerr << "VEC: \n";
			for (int i = 0; i < 4; ++i) {
				//~ cerr << vec[i].first << ' ' << vec[i].second << endl; 
				if (vec[i].second != vec[0].second) {
					dp2[mask] = vec[i];
					break; 
				}
			}
			//~ cerr << endl; 
		}
	}
	
	vector<int> cnt(m); 
	for (int i = 1; i <= n; ++i) {
		for (int j = 0; j < m; ++j) {
			cnt[j] += a[i][j];
		}
	}
	
	for (int i = 1; i <= n; ++i) {
		for (int j = 0; j < m; ++j) {
			cnt[j] -= a[i][j];
		}
	
		int ans = 0; 
		int mask = 0; 
		for (int j = 0; j < m; ++j) {
			if (cnt[j] != n / 2) {
				mask |= (1 << j); 
			}
			if (cnt[j] > n / 2) {
				ans++; 
			}
		}
		//~ cerr << "mask: " << mask << ' ' << dp[mask].second << ' ' << dp2[mask].second << endl; 
		if (dp[mask].second != i) {
			ans += m - __builtin_popcount(dp[mask].first);
		} else if (dp2[mask].second != 0) {
			ans += m - __builtin_popcount(dp2[mask].first); 
		}
		cout << ans << '\n'; 
		for (int j = 0; j < m; ++j) {
			cnt[j] += a[i][j];
		}
	}
	
	return 0; 
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 468 ms 25068 KB Output is correct
6 Correct 469 ms 24924 KB Output is correct
7 Correct 482 ms 24912 KB Output is correct
8 Correct 461 ms 25064 KB Output is correct
9 Correct 474 ms 25084 KB Output is correct
10 Correct 482 ms 24924 KB Output is correct
11 Correct 485 ms 24924 KB Output is correct
12 Correct 510 ms 25108 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 5 ms 848 KB Output is correct
42 Correct 5 ms 604 KB Output is correct
43 Correct 6 ms 604 KB Output is correct
44 Correct 6 ms 844 KB Output is correct
45 Correct 6 ms 600 KB Output is correct
46 Correct 51 ms 3520 KB Output is correct
47 Correct 52 ms 3420 KB Output is correct
48 Correct 52 ms 3420 KB Output is correct
49 Correct 50 ms 3528 KB Output is correct
50 Correct 52 ms 3532 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 468 ms 25068 KB Output is correct
6 Correct 469 ms 24924 KB Output is correct
7 Correct 482 ms 24912 KB Output is correct
8 Correct 461 ms 25064 KB Output is correct
9 Correct 474 ms 25084 KB Output is correct
10 Correct 482 ms 24924 KB Output is correct
11 Correct 485 ms 24924 KB Output is correct
12 Correct 510 ms 25108 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 5 ms 848 KB Output is correct
42 Correct 5 ms 604 KB Output is correct
43 Correct 6 ms 604 KB Output is correct
44 Correct 6 ms 844 KB Output is correct
45 Correct 6 ms 600 KB Output is correct
46 Correct 51 ms 3520 KB Output is correct
47 Correct 52 ms 3420 KB Output is correct
48 Correct 52 ms 3420 KB Output is correct
49 Correct 50 ms 3528 KB Output is correct
50 Correct 52 ms 3532 KB Output is correct
51 Correct 483 ms 25428 KB Output is correct
52 Correct 468 ms 25424 KB Output is correct
53 Correct 486 ms 25680 KB Output is correct
54 Correct 506 ms 25532 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 55 ms 3928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 84 ms 18580 KB Output is correct
3 Correct 80 ms 18512 KB Output is correct
4 Correct 66 ms 17940 KB Output is correct
5 Correct 81 ms 18636 KB Output is correct
6 Correct 57 ms 18004 KB Output is correct
7 Correct 88 ms 18632 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 428 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 84 ms 18580 KB Output is correct
3 Correct 80 ms 18512 KB Output is correct
4 Correct 66 ms 17940 KB Output is correct
5 Correct 81 ms 18636 KB Output is correct
6 Correct 57 ms 18004 KB Output is correct
7 Correct 88 ms 18632 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 428 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 310 ms 27828 KB Output is correct
21 Correct 286 ms 27432 KB Output is correct
22 Correct 286 ms 27404 KB Output is correct
23 Correct 292 ms 28324 KB Output is correct
24 Correct 287 ms 27984 KB Output is correct
25 Correct 355 ms 27984 KB Output is correct
26 Correct 309 ms 27984 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 436 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 0 ms 344 KB Output is correct
43 Correct 1 ms 428 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 84 ms 18580 KB Output is correct
3 Correct 80 ms 18512 KB Output is correct
4 Correct 66 ms 17940 KB Output is correct
5 Correct 81 ms 18636 KB Output is correct
6 Correct 57 ms 18004 KB Output is correct
7 Correct 88 ms 18632 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 428 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 310 ms 27828 KB Output is correct
21 Correct 286 ms 27432 KB Output is correct
22 Correct 286 ms 27404 KB Output is correct
23 Correct 292 ms 28324 KB Output is correct
24 Correct 287 ms 27984 KB Output is correct
25 Correct 355 ms 27984 KB Output is correct
26 Correct 309 ms 27984 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 436 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 0 ms 344 KB Output is correct
43 Correct 1 ms 428 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 440 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 468 ms 35412 KB Output is correct
48 Correct 455 ms 34432 KB Output is correct
49 Correct 428 ms 34644 KB Output is correct
50 Correct 432 ms 35596 KB Output is correct
51 Correct 417 ms 35412 KB Output is correct
52 Correct 500 ms 35328 KB Output is correct
53 Correct 461 ms 35596 KB Output is correct
54 Correct 5 ms 604 KB Output is correct
55 Correct 7 ms 840 KB Output is correct
56 Correct 9 ms 836 KB Output is correct
57 Correct 7 ms 844 KB Output is correct
58 Correct 6 ms 840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 84 ms 18580 KB Output is correct
3 Correct 80 ms 18512 KB Output is correct
4 Correct 66 ms 17940 KB Output is correct
5 Correct 81 ms 18636 KB Output is correct
6 Correct 57 ms 18004 KB Output is correct
7 Correct 88 ms 18632 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 428 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 310 ms 27828 KB Output is correct
21 Correct 286 ms 27432 KB Output is correct
22 Correct 286 ms 27404 KB Output is correct
23 Correct 292 ms 28324 KB Output is correct
24 Correct 287 ms 27984 KB Output is correct
25 Correct 355 ms 27984 KB Output is correct
26 Correct 309 ms 27984 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 436 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 0 ms 344 KB Output is correct
43 Correct 1 ms 428 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 440 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 468 ms 35412 KB Output is correct
48 Correct 455 ms 34432 KB Output is correct
49 Correct 428 ms 34644 KB Output is correct
50 Correct 432 ms 35596 KB Output is correct
51 Correct 417 ms 35412 KB Output is correct
52 Correct 500 ms 35328 KB Output is correct
53 Correct 461 ms 35596 KB Output is correct
54 Correct 5 ms 604 KB Output is correct
55 Correct 7 ms 840 KB Output is correct
56 Correct 9 ms 836 KB Output is correct
57 Correct 7 ms 844 KB Output is correct
58 Correct 6 ms 840 KB Output is correct
59 Correct 504 ms 42760 KB Output is correct
60 Correct 260 ms 19132 KB Output is correct
61 Correct 296 ms 20308 KB Output is correct
62 Correct 299 ms 20904 KB Output is correct
63 Correct 536 ms 42460 KB Output is correct
64 Correct 629 ms 44372 KB Output is correct
65 Correct 595 ms 44384 KB Output is correct
66 Correct 551 ms 44876 KB Output is correct
67 Correct 521 ms 44512 KB Output is correct
68 Correct 570 ms 44540 KB Output is correct
69 Correct 596 ms 44756 KB Output is correct
70 Correct 50 ms 3532 KB Output is correct
71 Correct 49 ms 3420 KB Output is correct
72 Correct 64 ms 3420 KB Output is correct
73 Correct 53 ms 3420 KB Output is correct
74 Correct 54 ms 3420 KB Output is correct
75 Correct 59 ms 3928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 468 ms 25068 KB Output is correct
6 Correct 469 ms 24924 KB Output is correct
7 Correct 482 ms 24912 KB Output is correct
8 Correct 461 ms 25064 KB Output is correct
9 Correct 474 ms 25084 KB Output is correct
10 Correct 482 ms 24924 KB Output is correct
11 Correct 485 ms 24924 KB Output is correct
12 Correct 510 ms 25108 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 5 ms 848 KB Output is correct
42 Correct 5 ms 604 KB Output is correct
43 Correct 6 ms 604 KB Output is correct
44 Correct 6 ms 844 KB Output is correct
45 Correct 6 ms 600 KB Output is correct
46 Correct 51 ms 3520 KB Output is correct
47 Correct 52 ms 3420 KB Output is correct
48 Correct 52 ms 3420 KB Output is correct
49 Correct 50 ms 3528 KB Output is correct
50 Correct 52 ms 3532 KB Output is correct
51 Correct 483 ms 25428 KB Output is correct
52 Correct 468 ms 25424 KB Output is correct
53 Correct 486 ms 25680 KB Output is correct
54 Correct 506 ms 25532 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 55 ms 3928 KB Output is correct
57 Correct 0 ms 344 KB Output is correct
58 Correct 84 ms 18580 KB Output is correct
59 Correct 80 ms 18512 KB Output is correct
60 Correct 66 ms 17940 KB Output is correct
61 Correct 81 ms 18636 KB Output is correct
62 Correct 57 ms 18004 KB Output is correct
63 Correct 88 ms 18632 KB Output is correct
64 Correct 0 ms 344 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 428 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 1 ms 604 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 310 ms 27828 KB Output is correct
77 Correct 286 ms 27432 KB Output is correct
78 Correct 286 ms 27404 KB Output is correct
79 Correct 292 ms 28324 KB Output is correct
80 Correct 287 ms 27984 KB Output is correct
81 Correct 355 ms 27984 KB Output is correct
82 Correct 309 ms 27984 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 0 ms 436 KB Output is correct
86 Correct 1 ms 348 KB Output is correct
87 Correct 1 ms 348 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 1 ms 348 KB Output is correct
92 Correct 1 ms 348 KB Output is correct
93 Correct 0 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 1 ms 344 KB Output is correct
97 Correct 1 ms 348 KB Output is correct
98 Correct 0 ms 344 KB Output is correct
99 Correct 1 ms 428 KB Output is correct
100 Correct 1 ms 348 KB Output is correct
101 Correct 1 ms 440 KB Output is correct
102 Correct 2 ms 348 KB Output is correct
103 Correct 468 ms 35412 KB Output is correct
104 Correct 455 ms 34432 KB Output is correct
105 Correct 428 ms 34644 KB Output is correct
106 Correct 432 ms 35596 KB Output is correct
107 Correct 417 ms 35412 KB Output is correct
108 Correct 500 ms 35328 KB Output is correct
109 Correct 461 ms 35596 KB Output is correct
110 Correct 5 ms 604 KB Output is correct
111 Correct 7 ms 840 KB Output is correct
112 Correct 9 ms 836 KB Output is correct
113 Correct 7 ms 844 KB Output is correct
114 Correct 6 ms 840 KB Output is correct
115 Correct 504 ms 42760 KB Output is correct
116 Correct 260 ms 19132 KB Output is correct
117 Correct 296 ms 20308 KB Output is correct
118 Correct 299 ms 20904 KB Output is correct
119 Correct 536 ms 42460 KB Output is correct
120 Correct 629 ms 44372 KB Output is correct
121 Correct 595 ms 44384 KB Output is correct
122 Correct 551 ms 44876 KB Output is correct
123 Correct 521 ms 44512 KB Output is correct
124 Correct 570 ms 44540 KB Output is correct
125 Correct 596 ms 44756 KB Output is correct
126 Correct 50 ms 3532 KB Output is correct
127 Correct 49 ms 3420 KB Output is correct
128 Correct 64 ms 3420 KB Output is correct
129 Correct 53 ms 3420 KB Output is correct
130 Correct 54 ms 3420 KB Output is correct
131 Correct 59 ms 3928 KB Output is correct
132 Correct 1143 ms 72788 KB Output is correct
133 Correct 1083 ms 72640 KB Output is correct
134 Correct 1078 ms 72892 KB Output is correct
135 Correct 1101 ms 72784 KB Output is correct
136 Correct 1163 ms 72784 KB Output is correct
137 Correct 862 ms 59728 KB Output is correct
138 Correct 806 ms 59988 KB Output is correct
139 Correct 1034 ms 72832 KB Output is correct
140 Correct 1063 ms 72528 KB Output is correct
141 Correct 1067 ms 72496 KB Output is correct
142 Correct 1132 ms 72748 KB Output is correct