Submission #920676

# Submission time Handle Problem Language Result Execution time Memory
920676 2024-02-02T22:12:36 Z OAleksa Council (JOI23_council) C++14
100 / 100
3616 ms 39884 KB
#include <bits/stdc++.h>
using namespace std;
//define int long long
#define f first
#define s second
const int N = 3e5 + 69;
const int M = 21;
int a[N], cnt[M], n, m;
int t[M], k, gas, pr, suf, bt, b, ans, c, s, x;
vector<pair<int, int>> g[1030];
pair<pair<int, int>, pair<int, int>> bst[1030][1030];
int kurac[1030][1030];
signed main() {
  int tt = 1;
  //cin >> tt;
  while (tt--) {
  	cin >> n >> m;
  	k = (m + 1) / 2;
  	for (int i = 1;i <= n;i++) {
  		for (int j = 0;j < m;j++) {
  			scanf("%d", &x);
  			if (x > 0) {
  				a[i] |= (1 << j);
  				cnt[j]++;
  			}
  		}
  		pr = (a[i] & ((1 << (m - k)) - 1));
  		suf = (a[i] >> (m - k));
  		g[pr].push_back({suf, a[i]});
  	}
  	for (int i = 0;i < (1 << k);i++) {
  		for (int j = 0;j < (1 << k);j++) {
  			bst[i][j] = {{(1 << m) - 1, m + 1}, {(1 << m) - 1, m + 1}};
  			kurac[i][j] = __builtin_popcount(i & j);
  			for (auto x : g[i]) {
  				int bt = __builtin_popcount(x.f & j);
  				if (bt < bst[i][j].f.s) {
  					bst[i][j].s = bst[i][j].f;
  					bst[i][j].f = {x.s, bt};
  				}
  				else if (bt < bst[i][j].s.s)
  					bst[i][j].s = {x.s, bt};
  			}
  		}
  	}
  	//sufix duzine k, prefix duzine m - k
  	for (int i = 1;i <= n;i++) {
  		b = ans = c = 0;
  		for (int j = 0;j < m;j++) {
  			gas = cnt[j] - ((a[i] & (1 << j)) > 0);
  			if (gas == (n >> 1)) {
  				b |= (1 << j);
  				c++;
  			}
  			else if (gas > (n >> 1))
  				ans++;
  		}
  		suf = (b >> (m - k)), s = c;
  		pr = (b & ((1 << (m - k)) - 1));
  		for (int j = 0;j < (1 << (m - k));j++) {
  			if (a[i] != bst[j][suf].f.f) 
  				s = min(s, bst[j][suf].f.s + kurac[pr][j]);
  			else 
  				s = min(s, bst[j][suf].s.s + kurac[pr][j]);
  		}
  		ans += c - s;
  		printf("%d\n", ans);
  	}
  }
  return 0;
}

Compilation message

council.cpp: In function 'int main()':
council.cpp:21:11: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |      scanf("%d", &x);
      |      ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 6744 KB Output is correct
3 Correct 1 ms 2648 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 6 ms 21084 KB Output is correct
6 Correct 8 ms 21084 KB Output is correct
7 Correct 6 ms 21084 KB Output is correct
8 Correct 7 ms 21084 KB Output is correct
9 Correct 8 ms 21084 KB Output is correct
10 Correct 7 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 12 ms 21084 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 1 ms 2652 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2392 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 1 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 4700 KB Output is correct
23 Correct 1 ms 2396 KB Output is correct
24 Correct 1 ms 2528 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4448 KB Output is correct
29 Correct 1 ms 4700 KB Output is correct
30 Correct 1 ms 4700 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 2524 KB Output is correct
33 Correct 1 ms 2548 KB Output is correct
34 Correct 1 ms 2392 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 4440 KB Output is correct
37 Correct 1 ms 4444 KB Output is correct
38 Correct 1 ms 4700 KB Output is correct
39 Correct 1 ms 4696 KB Output is correct
40 Correct 2 ms 4700 KB Output is correct
41 Correct 2 ms 6748 KB Output is correct
42 Correct 2 ms 6744 KB Output is correct
43 Correct 2 ms 6748 KB Output is correct
44 Correct 1 ms 6748 KB Output is correct
45 Correct 2 ms 6748 KB Output is correct
46 Correct 3 ms 12932 KB Output is correct
47 Correct 4 ms 12892 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12888 KB Output is correct
50 Correct 3 ms 12900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 6744 KB Output is correct
3 Correct 1 ms 2648 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 6 ms 21084 KB Output is correct
6 Correct 8 ms 21084 KB Output is correct
7 Correct 6 ms 21084 KB Output is correct
8 Correct 7 ms 21084 KB Output is correct
9 Correct 8 ms 21084 KB Output is correct
10 Correct 7 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 12 ms 21084 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 1 ms 2652 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2392 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 1 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 4700 KB Output is correct
23 Correct 1 ms 2396 KB Output is correct
24 Correct 1 ms 2528 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4448 KB Output is correct
29 Correct 1 ms 4700 KB Output is correct
30 Correct 1 ms 4700 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 2524 KB Output is correct
33 Correct 1 ms 2548 KB Output is correct
34 Correct 1 ms 2392 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 4440 KB Output is correct
37 Correct 1 ms 4444 KB Output is correct
38 Correct 1 ms 4700 KB Output is correct
39 Correct 1 ms 4696 KB Output is correct
40 Correct 2 ms 4700 KB Output is correct
41 Correct 2 ms 6748 KB Output is correct
42 Correct 2 ms 6744 KB Output is correct
43 Correct 2 ms 6748 KB Output is correct
44 Correct 1 ms 6748 KB Output is correct
45 Correct 2 ms 6748 KB Output is correct
46 Correct 3 ms 12932 KB Output is correct
47 Correct 4 ms 12892 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12888 KB Output is correct
50 Correct 3 ms 12900 KB Output is correct
51 Correct 20 ms 21364 KB Output is correct
52 Correct 20 ms 21340 KB Output is correct
53 Correct 25 ms 21340 KB Output is correct
54 Correct 49 ms 21336 KB Output is correct
55 Correct 2 ms 2396 KB Output is correct
56 Correct 19 ms 13148 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 66 ms 8120 KB Output is correct
3 Correct 63 ms 7096 KB Output is correct
4 Correct 50 ms 7348 KB Output is correct
5 Correct 70 ms 7604 KB Output is correct
6 Correct 50 ms 8892 KB Output is correct
7 Correct 74 ms 7596 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2392 KB Output is correct
12 Correct 1 ms 2652 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 66 ms 8120 KB Output is correct
3 Correct 63 ms 7096 KB Output is correct
4 Correct 50 ms 7348 KB Output is correct
5 Correct 70 ms 7604 KB Output is correct
6 Correct 50 ms 8892 KB Output is correct
7 Correct 74 ms 7596 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2392 KB Output is correct
12 Correct 1 ms 2652 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 244 ms 12424 KB Output is correct
21 Correct 229 ms 12128 KB Output is correct
22 Correct 225 ms 12264 KB Output is correct
23 Correct 222 ms 13240 KB Output is correct
24 Correct 225 ms 11560 KB Output is correct
25 Correct 236 ms 13120 KB Output is correct
26 Correct 254 ms 13396 KB Output is correct
27 Correct 1 ms 4700 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 1 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4700 KB Output is correct
35 Correct 1 ms 4700 KB Output is correct
36 Correct 2 ms 4700 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 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 4700 KB Output is correct
44 Correct 1 ms 4700 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 66 ms 8120 KB Output is correct
3 Correct 63 ms 7096 KB Output is correct
4 Correct 50 ms 7348 KB Output is correct
5 Correct 70 ms 7604 KB Output is correct
6 Correct 50 ms 8892 KB Output is correct
7 Correct 74 ms 7596 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2392 KB Output is correct
12 Correct 1 ms 2652 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 244 ms 12424 KB Output is correct
21 Correct 229 ms 12128 KB Output is correct
22 Correct 225 ms 12264 KB Output is correct
23 Correct 222 ms 13240 KB Output is correct
24 Correct 225 ms 11560 KB Output is correct
25 Correct 236 ms 13120 KB Output is correct
26 Correct 254 ms 13396 KB Output is correct
27 Correct 1 ms 4700 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 1 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4700 KB Output is correct
35 Correct 1 ms 4700 KB Output is correct
36 Correct 2 ms 4700 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 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 4700 KB Output is correct
44 Correct 1 ms 4700 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
46 Correct 1 ms 6748 KB Output is correct
47 Correct 462 ms 16092 KB Output is correct
48 Correct 394 ms 16180 KB Output is correct
49 Correct 388 ms 15768 KB Output is correct
50 Correct 382 ms 16568 KB Output is correct
51 Correct 398 ms 15764 KB Output is correct
52 Correct 402 ms 16500 KB Output is correct
53 Correct 446 ms 17344 KB Output is correct
54 Correct 2 ms 6748 KB Output is correct
55 Correct 2 ms 6748 KB Output is correct
56 Correct 1 ms 6748 KB Output is correct
57 Correct 1 ms 6748 KB Output is correct
58 Correct 2 ms 6748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 66 ms 8120 KB Output is correct
3 Correct 63 ms 7096 KB Output is correct
4 Correct 50 ms 7348 KB Output is correct
5 Correct 70 ms 7604 KB Output is correct
6 Correct 50 ms 8892 KB Output is correct
7 Correct 74 ms 7596 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2392 KB Output is correct
12 Correct 1 ms 2652 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 244 ms 12424 KB Output is correct
21 Correct 229 ms 12128 KB Output is correct
22 Correct 225 ms 12264 KB Output is correct
23 Correct 222 ms 13240 KB Output is correct
24 Correct 225 ms 11560 KB Output is correct
25 Correct 236 ms 13120 KB Output is correct
26 Correct 254 ms 13396 KB Output is correct
27 Correct 1 ms 4700 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 1 ms 4444 KB Output is correct
33 Correct 1 ms 4444 KB Output is correct
34 Correct 1 ms 4700 KB Output is correct
35 Correct 1 ms 4700 KB Output is correct
36 Correct 2 ms 4700 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 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 4700 KB Output is correct
44 Correct 1 ms 4700 KB Output is correct
45 Correct 1 ms 4700 KB Output is correct
46 Correct 1 ms 6748 KB Output is correct
47 Correct 462 ms 16092 KB Output is correct
48 Correct 394 ms 16180 KB Output is correct
49 Correct 388 ms 15768 KB Output is correct
50 Correct 382 ms 16568 KB Output is correct
51 Correct 398 ms 15764 KB Output is correct
52 Correct 402 ms 16500 KB Output is correct
53 Correct 446 ms 17344 KB Output is correct
54 Correct 2 ms 6748 KB Output is correct
55 Correct 2 ms 6748 KB Output is correct
56 Correct 1 ms 6748 KB Output is correct
57 Correct 1 ms 6748 KB Output is correct
58 Correct 2 ms 6748 KB Output is correct
59 Correct 575 ms 19260 KB Output is correct
60 Correct 328 ms 16760 KB Output is correct
61 Correct 388 ms 17396 KB Output is correct
62 Correct 365 ms 17420 KB Output is correct
63 Correct 629 ms 18668 KB Output is correct
64 Correct 843 ms 23464 KB Output is correct
65 Correct 861 ms 23532 KB Output is correct
66 Correct 761 ms 23124 KB Output is correct
67 Correct 759 ms 22216 KB Output is correct
68 Correct 789 ms 24212 KB Output is correct
69 Correct 866 ms 24136 KB Output is correct
70 Correct 3 ms 12892 KB Output is correct
71 Correct 3 ms 12892 KB Output is correct
72 Correct 3 ms 12892 KB Output is correct
73 Correct 3 ms 12760 KB Output is correct
74 Correct 3 ms 12888 KB Output is correct
75 Correct 14 ms 12892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 6744 KB Output is correct
3 Correct 1 ms 2648 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 6 ms 21084 KB Output is correct
6 Correct 8 ms 21084 KB Output is correct
7 Correct 6 ms 21084 KB Output is correct
8 Correct 7 ms 21084 KB Output is correct
9 Correct 8 ms 21084 KB Output is correct
10 Correct 7 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 12 ms 21084 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 1 ms 2652 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2392 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 1 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 4700 KB Output is correct
23 Correct 1 ms 2396 KB Output is correct
24 Correct 1 ms 2528 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 1 ms 4440 KB Output is correct
28 Correct 1 ms 4448 KB Output is correct
29 Correct 1 ms 4700 KB Output is correct
30 Correct 1 ms 4700 KB Output is correct
31 Correct 1 ms 4700 KB Output is correct
32 Correct 1 ms 2524 KB Output is correct
33 Correct 1 ms 2548 KB Output is correct
34 Correct 1 ms 2392 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 4440 KB Output is correct
37 Correct 1 ms 4444 KB Output is correct
38 Correct 1 ms 4700 KB Output is correct
39 Correct 1 ms 4696 KB Output is correct
40 Correct 2 ms 4700 KB Output is correct
41 Correct 2 ms 6748 KB Output is correct
42 Correct 2 ms 6744 KB Output is correct
43 Correct 2 ms 6748 KB Output is correct
44 Correct 1 ms 6748 KB Output is correct
45 Correct 2 ms 6748 KB Output is correct
46 Correct 3 ms 12932 KB Output is correct
47 Correct 4 ms 12892 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12888 KB Output is correct
50 Correct 3 ms 12900 KB Output is correct
51 Correct 20 ms 21364 KB Output is correct
52 Correct 20 ms 21340 KB Output is correct
53 Correct 25 ms 21340 KB Output is correct
54 Correct 49 ms 21336 KB Output is correct
55 Correct 2 ms 2396 KB Output is correct
56 Correct 19 ms 13148 KB Output is correct
57 Correct 1 ms 2392 KB Output is correct
58 Correct 66 ms 8120 KB Output is correct
59 Correct 63 ms 7096 KB Output is correct
60 Correct 50 ms 7348 KB Output is correct
61 Correct 70 ms 7604 KB Output is correct
62 Correct 50 ms 8892 KB Output is correct
63 Correct 74 ms 7596 KB Output is correct
64 Correct 1 ms 2396 KB Output is correct
65 Correct 1 ms 2648 KB Output is correct
66 Correct 1 ms 2396 KB Output is correct
67 Correct 1 ms 2392 KB Output is correct
68 Correct 1 ms 2652 KB Output is correct
69 Correct 1 ms 2396 KB Output is correct
70 Correct 1 ms 2396 KB Output is correct
71 Correct 1 ms 2396 KB Output is correct
72 Correct 1 ms 2396 KB Output is correct
73 Correct 1 ms 2396 KB Output is correct
74 Correct 1 ms 2396 KB Output is correct
75 Correct 1 ms 2396 KB Output is correct
76 Correct 244 ms 12424 KB Output is correct
77 Correct 229 ms 12128 KB Output is correct
78 Correct 225 ms 12264 KB Output is correct
79 Correct 222 ms 13240 KB Output is correct
80 Correct 225 ms 11560 KB Output is correct
81 Correct 236 ms 13120 KB Output is correct
82 Correct 254 ms 13396 KB Output is correct
83 Correct 1 ms 4700 KB Output is correct
84 Correct 1 ms 2396 KB Output is correct
85 Correct 1 ms 2396 KB Output is correct
86 Correct 1 ms 2396 KB Output is correct
87 Correct 1 ms 2396 KB Output is correct
88 Correct 1 ms 4444 KB Output is correct
89 Correct 1 ms 4444 KB Output is correct
90 Correct 1 ms 4700 KB Output is correct
91 Correct 1 ms 4700 KB Output is correct
92 Correct 2 ms 4700 KB Output is correct
93 Correct 1 ms 2396 KB Output is correct
94 Correct 1 ms 2396 KB Output is correct
95 Correct 1 ms 2396 KB Output is correct
96 Correct 1 ms 2396 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 4700 KB Output is correct
100 Correct 1 ms 4700 KB Output is correct
101 Correct 1 ms 4700 KB Output is correct
102 Correct 1 ms 6748 KB Output is correct
103 Correct 462 ms 16092 KB Output is correct
104 Correct 394 ms 16180 KB Output is correct
105 Correct 388 ms 15768 KB Output is correct
106 Correct 382 ms 16568 KB Output is correct
107 Correct 398 ms 15764 KB Output is correct
108 Correct 402 ms 16500 KB Output is correct
109 Correct 446 ms 17344 KB Output is correct
110 Correct 2 ms 6748 KB Output is correct
111 Correct 2 ms 6748 KB Output is correct
112 Correct 1 ms 6748 KB Output is correct
113 Correct 1 ms 6748 KB Output is correct
114 Correct 2 ms 6748 KB Output is correct
115 Correct 575 ms 19260 KB Output is correct
116 Correct 328 ms 16760 KB Output is correct
117 Correct 388 ms 17396 KB Output is correct
118 Correct 365 ms 17420 KB Output is correct
119 Correct 629 ms 18668 KB Output is correct
120 Correct 843 ms 23464 KB Output is correct
121 Correct 861 ms 23532 KB Output is correct
122 Correct 761 ms 23124 KB Output is correct
123 Correct 759 ms 22216 KB Output is correct
124 Correct 789 ms 24212 KB Output is correct
125 Correct 866 ms 24136 KB Output is correct
126 Correct 3 ms 12892 KB Output is correct
127 Correct 3 ms 12892 KB Output is correct
128 Correct 3 ms 12892 KB Output is correct
129 Correct 3 ms 12760 KB Output is correct
130 Correct 3 ms 12888 KB Output is correct
131 Correct 14 ms 12892 KB Output is correct
132 Correct 2991 ms 32576 KB Output is correct
133 Correct 3051 ms 32932 KB Output is correct
134 Correct 3224 ms 33168 KB Output is correct
135 Correct 3616 ms 33148 KB Output is correct
136 Correct 3499 ms 33092 KB Output is correct
137 Correct 1487 ms 37800 KB Output is correct
138 Correct 1426 ms 38068 KB Output is correct
139 Correct 1422 ms 37316 KB Output is correct
140 Correct 1404 ms 36112 KB Output is correct
141 Correct 1495 ms 39092 KB Output is correct
142 Correct 3453 ms 39884 KB Output is correct