Submission #737759

# Submission time Handle Problem Language Result Execution time Memory
737759 2023-05-07T17:06:40 Z arnold518 Council (JOI23_council) C++17
100 / 100
1561 ms 530280 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppp;

const int MAXN = 3e5;
const int MAXM = 20;
const int INF = 1e9;

int N, M, A[MAXN+10][MAXM+10];
int P[MAXM+10];
int B[MAXN+10];

ppp dp[(1<<MAXM)+10][MAXM+10];

pii operator + (pii &p, int q)
{
	return {p.first+q, p.second};
}

ppp operator + (ppp &p, int q)
{
	return {p.first+q, p.second+q};
}

void f(ppp &p, ppp q)
{
	if(p.first<q.first)
	{
		if(q.first.second==p.first.second) q.first=q.second;
		p={p.first, min(q.first, p.second)};
	}
	else
	{
		if(p.first.second==q.first.second) p.first=p.second;
		p={q.first, min(p.first, q.second)};
	}
}

int main()
{
	scanf("%d%d", &N, &M);
	for(int i=1; i<=N; i++) for(int j=0; j<M; j++) scanf("%d", &A[i][j]);
	for(int j=0; j<M; j++)
	{
		int cnt=0;
		for(int i=1; i<=N; i++) cnt+=A[i][j];
		if(cnt<N/2) P[j]=0;
		else if(cnt>N/2+1) P[j]=3;
		else if(cnt==N/2) P[j]=1;
		else if(cnt==N/2+1) P[j]=2;
	}

	for(int j=0; j<=M; j++) for(int i=0; i<(1<<M); i++) dp[i][j]={pii(INF, -1), pii(INF, -1)};
	for(int i=1; i<=N; i++)
	{
		for(int j=0; j<M; j++) B[i]|=(A[i][j]<<j);
		f(dp[B[i]][0], {pii(0, i), pii(INF, -1)});
	}

	for(int i=0; i<M; i++)
	{
		for(int j=0; j<(1<<M); j++)
		{
			if(P[i]==0)
			{
				f(dp[j][i+1], dp[j][i]+1);
				f(dp[j][i+1], dp[j^(1<<i)][i]+1);
			}
			if(P[i]==3)
			{
				f(dp[j][i+1], dp[j][i]);
				f(dp[j][i+1], dp[j^(1<<i)][i]);
			}	
			if(P[i]==1)
			{
				if(j&(1<<i))
				{
					f(dp[j][i+1], dp[j][i]+1);
					f(dp[j][i+1], dp[j^(1<<i)][i]+1);
				}
				else
				{
					f(dp[j][i+1], dp[j][i]);
					f(dp[j][i+1], dp[j^(1<<i)][i]+1);
				}
			}
			if(P[i]==2)
			{
				if(j&(1<<i))
				{
					f(dp[j][i+1], dp[j][i]+1);
					f(dp[j][i+1], dp[j^(1<<i)][i]);
				}
				else
				{
					f(dp[j][i+1], dp[j][i]);
					f(dp[j][i+1], dp[j^(1<<i)][i]);
				}
			}
		}
	}
	for(int i=1; i<=N; i++)
	{
		if(dp[B[i]][M].first.second!=i) printf("%d\n", M-dp[B[i]][M].first.first);
		else printf("%d\n", M-dp[B[i]][M].second.first);
	}
}

Compilation message

council.cpp: In function 'int main()':
council.cpp:45:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   45 |  scanf("%d%d", &N, &M);
      |  ~~~~~^~~~~~~~~~~~~~~~
council.cpp:46:54: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   46 |  for(int i=1; i<=N; i++) for(int j=0; j<M; j++) scanf("%d", &A[i][j]);
      |                                                 ~~~~~^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 2132 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 874 ms 492876 KB Output is correct
6 Correct 832 ms 492956 KB Output is correct
7 Correct 843 ms 492800 KB Output is correct
8 Correct 863 ms 492812 KB Output is correct
9 Correct 856 ms 492856 KB Output is correct
10 Correct 822 ms 492852 KB Output is correct
11 Correct 816 ms 492784 KB Output is correct
12 Correct 824 ms 492820 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 312 KB Output is correct
17 Correct 1 ms 312 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 312 KB Output is correct
22 Correct 1 ms 724 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 1 ms 724 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 444 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 820 KB Output is correct
41 Correct 7 ms 8020 KB Output is correct
42 Correct 7 ms 8020 KB Output is correct
43 Correct 7 ms 8020 KB Output is correct
44 Correct 6 ms 8020 KB Output is correct
45 Correct 8 ms 8020 KB Output is correct
46 Correct 92 ms 61860 KB Output is correct
47 Correct 89 ms 61824 KB Output is correct
48 Correct 92 ms 61860 KB Output is correct
49 Correct 94 ms 61768 KB Output is correct
50 Correct 101 ms 61860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 2132 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 874 ms 492876 KB Output is correct
6 Correct 832 ms 492956 KB Output is correct
7 Correct 843 ms 492800 KB Output is correct
8 Correct 863 ms 492812 KB Output is correct
9 Correct 856 ms 492856 KB Output is correct
10 Correct 822 ms 492852 KB Output is correct
11 Correct 816 ms 492784 KB Output is correct
12 Correct 824 ms 492820 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 312 KB Output is correct
17 Correct 1 ms 312 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 312 KB Output is correct
22 Correct 1 ms 724 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 1 ms 724 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 444 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 820 KB Output is correct
41 Correct 7 ms 8020 KB Output is correct
42 Correct 7 ms 8020 KB Output is correct
43 Correct 7 ms 8020 KB Output is correct
44 Correct 6 ms 8020 KB Output is correct
45 Correct 8 ms 8020 KB Output is correct
46 Correct 92 ms 61860 KB Output is correct
47 Correct 89 ms 61824 KB Output is correct
48 Correct 92 ms 61860 KB Output is correct
49 Correct 94 ms 61768 KB Output is correct
50 Correct 101 ms 61860 KB Output is correct
51 Correct 803 ms 493172 KB Output is correct
52 Correct 828 ms 493280 KB Output is correct
53 Correct 834 ms 493284 KB Output is correct
54 Correct 934 ms 493176 KB Output is correct
55 Correct 1 ms 676 KB Output is correct
56 Correct 101 ms 62256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 95 ms 37372 KB Output is correct
3 Correct 99 ms 37392 KB Output is correct
4 Correct 68 ms 37324 KB Output is correct
5 Correct 94 ms 37336 KB Output is correct
6 Correct 68 ms 37304 KB Output is correct
7 Correct 103 ms 37412 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 95 ms 37372 KB Output is correct
3 Correct 99 ms 37392 KB Output is correct
4 Correct 68 ms 37324 KB Output is correct
5 Correct 94 ms 37336 KB Output is correct
6 Correct 68 ms 37304 KB Output is correct
7 Correct 103 ms 37412 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 275 ms 38040 KB Output is correct
21 Correct 260 ms 37720 KB Output is correct
22 Correct 263 ms 37760 KB Output is correct
23 Correct 249 ms 38324 KB Output is correct
24 Correct 260 ms 38008 KB Output is correct
25 Correct 286 ms 38020 KB Output is correct
26 Correct 301 ms 38012 KB Output is correct
27 Correct 1 ms 724 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 312 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 852 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 95 ms 37372 KB Output is correct
3 Correct 99 ms 37392 KB Output is correct
4 Correct 68 ms 37324 KB Output is correct
5 Correct 94 ms 37336 KB Output is correct
6 Correct 68 ms 37304 KB Output is correct
7 Correct 103 ms 37412 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 275 ms 38040 KB Output is correct
21 Correct 260 ms 37720 KB Output is correct
22 Correct 263 ms 37760 KB Output is correct
23 Correct 249 ms 38324 KB Output is correct
24 Correct 260 ms 38008 KB Output is correct
25 Correct 286 ms 38020 KB Output is correct
26 Correct 301 ms 38012 KB Output is correct
27 Correct 1 ms 724 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 312 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 852 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 852 KB Output is correct
46 Correct 3 ms 2132 KB Output is correct
47 Correct 399 ms 45200 KB Output is correct
48 Correct 345 ms 41508 KB Output is correct
49 Correct 394 ms 41332 KB Output is correct
50 Correct 376 ms 45560 KB Output is correct
51 Correct 329 ms 45160 KB Output is correct
52 Correct 369 ms 45172 KB Output is correct
53 Correct 388 ms 45684 KB Output is correct
54 Correct 8 ms 8020 KB Output is correct
55 Correct 8 ms 8016 KB Output is correct
56 Correct 7 ms 8020 KB Output is correct
57 Correct 6 ms 8020 KB Output is correct
58 Correct 8 ms 8020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 95 ms 37372 KB Output is correct
3 Correct 99 ms 37392 KB Output is correct
4 Correct 68 ms 37324 KB Output is correct
5 Correct 94 ms 37336 KB Output is correct
6 Correct 68 ms 37304 KB Output is correct
7 Correct 103 ms 37412 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 275 ms 38040 KB Output is correct
21 Correct 260 ms 37720 KB Output is correct
22 Correct 263 ms 37760 KB Output is correct
23 Correct 249 ms 38324 KB Output is correct
24 Correct 260 ms 38008 KB Output is correct
25 Correct 286 ms 38020 KB Output is correct
26 Correct 301 ms 38012 KB Output is correct
27 Correct 1 ms 724 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 312 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 852 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 852 KB Output is correct
46 Correct 3 ms 2132 KB Output is correct
47 Correct 399 ms 45200 KB Output is correct
48 Correct 345 ms 41508 KB Output is correct
49 Correct 394 ms 41332 KB Output is correct
50 Correct 376 ms 45560 KB Output is correct
51 Correct 329 ms 45160 KB Output is correct
52 Correct 369 ms 45172 KB Output is correct
53 Correct 388 ms 45684 KB Output is correct
54 Correct 8 ms 8020 KB Output is correct
55 Correct 8 ms 8016 KB Output is correct
56 Correct 7 ms 8020 KB Output is correct
57 Correct 6 ms 8020 KB Output is correct
58 Correct 8 ms 8020 KB Output is correct
59 Correct 473 ms 68508 KB Output is correct
60 Correct 282 ms 76376 KB Output is correct
61 Correct 284 ms 77396 KB Output is correct
62 Correct 298 ms 77812 KB Output is correct
63 Correct 455 ms 68268 KB Output is correct
64 Correct 573 ms 99148 KB Output is correct
65 Correct 560 ms 99212 KB Output is correct
66 Correct 539 ms 99328 KB Output is correct
67 Correct 471 ms 99000 KB Output is correct
68 Correct 572 ms 99060 KB Output is correct
69 Correct 579 ms 99356 KB Output is correct
70 Correct 100 ms 61780 KB Output is correct
71 Correct 88 ms 61872 KB Output is correct
72 Correct 93 ms 61872 KB Output is correct
73 Correct 104 ms 61860 KB Output is correct
74 Correct 92 ms 61868 KB Output is correct
75 Correct 98 ms 62224 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 2132 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 874 ms 492876 KB Output is correct
6 Correct 832 ms 492956 KB Output is correct
7 Correct 843 ms 492800 KB Output is correct
8 Correct 863 ms 492812 KB Output is correct
9 Correct 856 ms 492856 KB Output is correct
10 Correct 822 ms 492852 KB Output is correct
11 Correct 816 ms 492784 KB Output is correct
12 Correct 824 ms 492820 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 312 KB Output is correct
17 Correct 1 ms 312 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 312 KB Output is correct
22 Correct 1 ms 724 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 1 ms 724 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 444 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 820 KB Output is correct
41 Correct 7 ms 8020 KB Output is correct
42 Correct 7 ms 8020 KB Output is correct
43 Correct 7 ms 8020 KB Output is correct
44 Correct 6 ms 8020 KB Output is correct
45 Correct 8 ms 8020 KB Output is correct
46 Correct 92 ms 61860 KB Output is correct
47 Correct 89 ms 61824 KB Output is correct
48 Correct 92 ms 61860 KB Output is correct
49 Correct 94 ms 61768 KB Output is correct
50 Correct 101 ms 61860 KB Output is correct
51 Correct 803 ms 493172 KB Output is correct
52 Correct 828 ms 493280 KB Output is correct
53 Correct 834 ms 493284 KB Output is correct
54 Correct 934 ms 493176 KB Output is correct
55 Correct 1 ms 676 KB Output is correct
56 Correct 101 ms 62256 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 95 ms 37372 KB Output is correct
59 Correct 99 ms 37392 KB Output is correct
60 Correct 68 ms 37324 KB Output is correct
61 Correct 94 ms 37336 KB Output is correct
62 Correct 68 ms 37304 KB Output is correct
63 Correct 103 ms 37412 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 1 ms 340 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 1 ms 212 KB Output is correct
71 Correct 1 ms 212 KB Output is correct
72 Correct 1 ms 340 KB Output is correct
73 Correct 1 ms 596 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 0 ms 340 KB Output is correct
76 Correct 275 ms 38040 KB Output is correct
77 Correct 260 ms 37720 KB Output is correct
78 Correct 263 ms 37760 KB Output is correct
79 Correct 249 ms 38324 KB Output is correct
80 Correct 260 ms 38008 KB Output is correct
81 Correct 286 ms 38020 KB Output is correct
82 Correct 301 ms 38012 KB Output is correct
83 Correct 1 ms 724 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 1 ms 312 KB Output is correct
87 Correct 1 ms 340 KB Output is correct
88 Correct 0 ms 340 KB Output is correct
89 Correct 1 ms 340 KB Output is correct
90 Correct 1 ms 468 KB Output is correct
91 Correct 1 ms 724 KB Output is correct
92 Correct 1 ms 852 KB Output is correct
93 Correct 0 ms 212 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 1 ms 340 KB Output is correct
96 Correct 1 ms 340 KB Output is correct
97 Correct 1 ms 340 KB Output is correct
98 Correct 1 ms 340 KB Output is correct
99 Correct 1 ms 468 KB Output is correct
100 Correct 1 ms 724 KB Output is correct
101 Correct 1 ms 852 KB Output is correct
102 Correct 3 ms 2132 KB Output is correct
103 Correct 399 ms 45200 KB Output is correct
104 Correct 345 ms 41508 KB Output is correct
105 Correct 394 ms 41332 KB Output is correct
106 Correct 376 ms 45560 KB Output is correct
107 Correct 329 ms 45160 KB Output is correct
108 Correct 369 ms 45172 KB Output is correct
109 Correct 388 ms 45684 KB Output is correct
110 Correct 8 ms 8020 KB Output is correct
111 Correct 8 ms 8016 KB Output is correct
112 Correct 7 ms 8020 KB Output is correct
113 Correct 6 ms 8020 KB Output is correct
114 Correct 8 ms 8020 KB Output is correct
115 Correct 473 ms 68508 KB Output is correct
116 Correct 282 ms 76376 KB Output is correct
117 Correct 284 ms 77396 KB Output is correct
118 Correct 298 ms 77812 KB Output is correct
119 Correct 455 ms 68268 KB Output is correct
120 Correct 573 ms 99148 KB Output is correct
121 Correct 560 ms 99212 KB Output is correct
122 Correct 539 ms 99328 KB Output is correct
123 Correct 471 ms 99000 KB Output is correct
124 Correct 572 ms 99060 KB Output is correct
125 Correct 579 ms 99356 KB Output is correct
126 Correct 100 ms 61780 KB Output is correct
127 Correct 88 ms 61872 KB Output is correct
128 Correct 93 ms 61872 KB Output is correct
129 Correct 104 ms 61860 KB Output is correct
130 Correct 92 ms 61868 KB Output is correct
131 Correct 98 ms 62224 KB Output is correct
132 Correct 1330 ms 530280 KB Output is correct
133 Correct 1427 ms 530036 KB Output is correct
134 Correct 1365 ms 530140 KB Output is correct
135 Correct 1561 ms 530060 KB Output is correct
136 Correct 1479 ms 530252 KB Output is correct
137 Correct 1008 ms 283900 KB Output is correct
138 Correct 954 ms 283972 KB Output is correct
139 Correct 1272 ms 530060 KB Output is correct
140 Correct 1202 ms 529884 KB Output is correct
141 Correct 1414 ms 529888 KB Output is correct
142 Correct 1498 ms 530184 KB Output is correct