Submission #828267

# Submission time Handle Problem Language Result Execution time Memory
828267 2023-08-17T07:31:55 Z CSQ31 Council (JOI23_council) C++17
100 / 100
3312 ms 30520 KB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) (int)(a.size())
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
ll gcd(ll a,ll b){if(!b)return a;else return gcd(b,a%b);}
int a[300001],cnt[20];
pii bit[2][1024][1024];
//i,m0,m1 : first half of mask = m0, second half of mask has i bits in common with m1 
int main()
{
	owo
	int n,m;
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		for(int j=0;j<m;j++){
			int x;
			cin>>x;
			
			a[i] |= (x<<j);
			cnt[j]+=x;
		}
		int m0 = a[i]&1023;
		int m1 = a[i]>>10;
		for(int j=0;j<1024;j++){
			int c = __builtin_popcount(m1&j);
			if(!bit[0][m0][j].se)bit[0][m0][j] = {c,i};
			else{
				if(c <= bit[0][m0][j].fi){
					bit[1][m0][j] = bit[0][m0][j];
					bit[0][m0][j] = {c,i};		
				}else if(!bit[1][m0][j].se || c <= bit[1][m0][j].fi ){
					bit[1][m0][j] = {c,i};		
				}
				
			}
		}
	}
	for(int i=1;i<=n;i++){
		int mask = 0,ans = 0;
		for(int j=0;j<m;j++){
			if((a[i]>>j)&1)cnt[j]--;
			
			if(cnt[j] >= n/2)ans++;
			if(cnt[j] == n/2)mask+=(1<<j); //we try to make this bit off
		}
		int m0 = mask&1023;
		int m1 = mask>>10;
		int mn = 20;
		for(int j=0;j<1024;j++){
			int c = __builtin_popcount(m0&j);
			if(!bit[0][j][m1].se)continue;
			
			int kek = 20;
			if(bit[0][j][m1].se != i)kek = bit[0][j][m1].fi;
			else if(bit[1][j][m1].se)kek = bit[1][j][m1].fi;
			mn = min(mn,kek+c);
		}
		cout<<ans-mn<<'\n';
		
		for(int j=0;j<m;j++){
			if((a[i]>>j)&1)cnt[j]++;
		}
	}

	
	
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 3 ms 336 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 580 KB Output is correct
9 Correct 4 ms 3668 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 7 ms 3672 KB Output is correct
13 Correct 1 ms 328 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 2 ms 324 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 2 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 1 ms 596 KB Output is correct
26 Correct 2 ms 1236 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 1 ms 852 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 4 ms 3668 KB Output is correct
32 Correct 1 ms 368 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 596 KB Output is correct
35 Correct 2 ms 1236 KB Output is correct
36 Correct 1 ms 580 KB Output is correct
37 Correct 2 ms 852 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 4 ms 3656 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 596 KB Output is correct
44 Correct 1 ms 328 KB Output is correct
45 Correct 1 ms 596 KB Output is correct
46 Correct 1 ms 468 KB Output is correct
47 Correct 1 ms 340 KB Output is correct
48 Correct 1 ms 596 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 3 ms 336 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 580 KB Output is correct
9 Correct 4 ms 3668 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 7 ms 3672 KB Output is correct
13 Correct 1 ms 328 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 2 ms 324 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 2 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 1 ms 596 KB Output is correct
26 Correct 2 ms 1236 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 1 ms 852 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 4 ms 3668 KB Output is correct
32 Correct 1 ms 368 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 596 KB Output is correct
35 Correct 2 ms 1236 KB Output is correct
36 Correct 1 ms 580 KB Output is correct
37 Correct 2 ms 852 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 4 ms 3656 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 596 KB Output is correct
44 Correct 1 ms 328 KB Output is correct
45 Correct 1 ms 596 KB Output is correct
46 Correct 1 ms 468 KB Output is correct
47 Correct 1 ms 340 KB Output is correct
48 Correct 1 ms 596 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 596 KB Output is correct
51 Correct 17 ms 472 KB Output is correct
52 Correct 19 ms 468 KB Output is correct
53 Correct 31 ms 15764 KB Output is correct
54 Correct 35 ms 15620 KB Output is correct
55 Correct 18 ms 432 KB Output is correct
56 Correct 32 ms 15544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1510 ms 2600 KB Output is correct
3 Correct 1493 ms 2764 KB Output is correct
4 Correct 1522 ms 2600 KB Output is correct
5 Correct 1534 ms 2612 KB Output is correct
6 Correct 1471 ms 2604 KB Output is correct
7 Correct 1495 ms 2560 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 2 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 340 KB Output is correct
12 Correct 2 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 328 KB Output is correct
16 Correct 2 ms 408 KB Output is correct
17 Correct 16 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1510 ms 2600 KB Output is correct
3 Correct 1493 ms 2764 KB Output is correct
4 Correct 1522 ms 2600 KB Output is correct
5 Correct 1534 ms 2612 KB Output is correct
6 Correct 1471 ms 2604 KB Output is correct
7 Correct 1495 ms 2560 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 2 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 340 KB Output is correct
12 Correct 2 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 328 KB Output is correct
16 Correct 2 ms 408 KB Output is correct
17 Correct 16 ms 332 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1959 ms 8108 KB Output is correct
21 Correct 1841 ms 5768 KB Output is correct
22 Correct 1839 ms 5640 KB Output is correct
23 Correct 1623 ms 2844 KB Output is correct
24 Correct 1635 ms 2560 KB Output is correct
25 Correct 2050 ms 19024 KB Output is correct
26 Correct 2005 ms 18996 KB Output is correct
27 Correct 1 ms 456 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 580 KB Output is correct
31 Correct 2 ms 1236 KB Output is correct
32 Correct 1 ms 596 KB Output is correct
33 Correct 1 ms 852 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 2 ms 724 KB Output is correct
36 Correct 4 ms 3668 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 456 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 1236 KB Output is correct
41 Correct 1 ms 596 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 4 ms 3668 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1510 ms 2600 KB Output is correct
3 Correct 1493 ms 2764 KB Output is correct
4 Correct 1522 ms 2600 KB Output is correct
5 Correct 1534 ms 2612 KB Output is correct
6 Correct 1471 ms 2604 KB Output is correct
7 Correct 1495 ms 2560 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 2 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 340 KB Output is correct
12 Correct 2 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 328 KB Output is correct
16 Correct 2 ms 408 KB Output is correct
17 Correct 16 ms 332 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1959 ms 8108 KB Output is correct
21 Correct 1841 ms 5768 KB Output is correct
22 Correct 1839 ms 5640 KB Output is correct
23 Correct 1623 ms 2844 KB Output is correct
24 Correct 1635 ms 2560 KB Output is correct
25 Correct 2050 ms 19024 KB Output is correct
26 Correct 2005 ms 18996 KB Output is correct
27 Correct 1 ms 456 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 580 KB Output is correct
31 Correct 2 ms 1236 KB Output is correct
32 Correct 1 ms 596 KB Output is correct
33 Correct 1 ms 852 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 2 ms 724 KB Output is correct
36 Correct 4 ms 3668 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 456 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 1236 KB Output is correct
41 Correct 1 ms 596 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 4 ms 3668 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 2069 ms 17748 KB Output is correct
48 Correct 2043 ms 14544 KB Output is correct
49 Correct 2053 ms 14636 KB Output is correct
50 Correct 1621 ms 2488 KB Output is correct
51 Correct 1660 ms 2100 KB Output is correct
52 Correct 2086 ms 18408 KB Output is correct
53 Correct 2029 ms 18680 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1510 ms 2600 KB Output is correct
3 Correct 1493 ms 2764 KB Output is correct
4 Correct 1522 ms 2600 KB Output is correct
5 Correct 1534 ms 2612 KB Output is correct
6 Correct 1471 ms 2604 KB Output is correct
7 Correct 1495 ms 2560 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 2 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 340 KB Output is correct
12 Correct 2 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 328 KB Output is correct
16 Correct 2 ms 408 KB Output is correct
17 Correct 16 ms 332 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1959 ms 8108 KB Output is correct
21 Correct 1841 ms 5768 KB Output is correct
22 Correct 1839 ms 5640 KB Output is correct
23 Correct 1623 ms 2844 KB Output is correct
24 Correct 1635 ms 2560 KB Output is correct
25 Correct 2050 ms 19024 KB Output is correct
26 Correct 2005 ms 18996 KB Output is correct
27 Correct 1 ms 456 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 580 KB Output is correct
31 Correct 2 ms 1236 KB Output is correct
32 Correct 1 ms 596 KB Output is correct
33 Correct 1 ms 852 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 2 ms 724 KB Output is correct
36 Correct 4 ms 3668 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 456 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 1236 KB Output is correct
41 Correct 1 ms 596 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 4 ms 3668 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 2069 ms 17748 KB Output is correct
48 Correct 2043 ms 14544 KB Output is correct
49 Correct 2053 ms 14636 KB Output is correct
50 Correct 1621 ms 2488 KB Output is correct
51 Correct 1660 ms 2100 KB Output is correct
52 Correct 2086 ms 18408 KB Output is correct
53 Correct 2029 ms 18680 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 596 KB Output is correct
59 Correct 2213 ms 18636 KB Output is correct
60 Correct 927 ms 17500 KB Output is correct
61 Correct 887 ms 17468 KB Output is correct
62 Correct 959 ms 17496 KB Output is correct
63 Correct 2078 ms 18276 KB Output is correct
64 Correct 2241 ms 18192 KB Output is correct
65 Correct 2189 ms 18204 KB Output is correct
66 Correct 1761 ms 2344 KB Output is correct
67 Correct 1744 ms 2060 KB Output is correct
68 Correct 2141 ms 18432 KB Output is correct
69 Correct 2157 ms 18888 KB Output is correct
70 Correct 1 ms 468 KB Output is correct
71 Correct 1 ms 340 KB Output is correct
72 Correct 2 ms 596 KB Output is correct
73 Correct 1 ms 340 KB Output is correct
74 Correct 1 ms 596 KB Output is correct
75 Correct 31 ms 15452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 3 ms 336 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 580 KB Output is correct
9 Correct 4 ms 3668 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 7 ms 3672 KB Output is correct
13 Correct 1 ms 328 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 2 ms 324 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 2 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 1 ms 596 KB Output is correct
26 Correct 2 ms 1236 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 1 ms 852 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 4 ms 3668 KB Output is correct
32 Correct 1 ms 368 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 596 KB Output is correct
35 Correct 2 ms 1236 KB Output is correct
36 Correct 1 ms 580 KB Output is correct
37 Correct 2 ms 852 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 4 ms 3656 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 596 KB Output is correct
44 Correct 1 ms 328 KB Output is correct
45 Correct 1 ms 596 KB Output is correct
46 Correct 1 ms 468 KB Output is correct
47 Correct 1 ms 340 KB Output is correct
48 Correct 1 ms 596 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 596 KB Output is correct
51 Correct 17 ms 472 KB Output is correct
52 Correct 19 ms 468 KB Output is correct
53 Correct 31 ms 15764 KB Output is correct
54 Correct 35 ms 15620 KB Output is correct
55 Correct 18 ms 432 KB Output is correct
56 Correct 32 ms 15544 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1510 ms 2600 KB Output is correct
59 Correct 1493 ms 2764 KB Output is correct
60 Correct 1522 ms 2600 KB Output is correct
61 Correct 1534 ms 2612 KB Output is correct
62 Correct 1471 ms 2604 KB Output is correct
63 Correct 1495 ms 2560 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 2 ms 340 KB Output is correct
66 Correct 1 ms 340 KB Output is correct
67 Correct 2 ms 340 KB Output is correct
68 Correct 2 ms 340 KB Output is correct
69 Correct 1 ms 340 KB Output is correct
70 Correct 1 ms 332 KB Output is correct
71 Correct 1 ms 328 KB Output is correct
72 Correct 2 ms 408 KB Output is correct
73 Correct 16 ms 332 KB Output is correct
74 Correct 1 ms 340 KB Output is correct
75 Correct 1 ms 468 KB Output is correct
76 Correct 1959 ms 8108 KB Output is correct
77 Correct 1841 ms 5768 KB Output is correct
78 Correct 1839 ms 5640 KB Output is correct
79 Correct 1623 ms 2844 KB Output is correct
80 Correct 1635 ms 2560 KB Output is correct
81 Correct 2050 ms 19024 KB Output is correct
82 Correct 2005 ms 18996 KB Output is correct
83 Correct 1 ms 456 KB Output is correct
84 Correct 1 ms 340 KB Output is correct
85 Correct 1 ms 468 KB Output is correct
86 Correct 1 ms 580 KB Output is correct
87 Correct 2 ms 1236 KB Output is correct
88 Correct 1 ms 596 KB Output is correct
89 Correct 1 ms 852 KB Output is correct
90 Correct 1 ms 468 KB Output is correct
91 Correct 2 ms 724 KB Output is correct
92 Correct 4 ms 3668 KB Output is correct
93 Correct 1 ms 340 KB Output is correct
94 Correct 1 ms 456 KB Output is correct
95 Correct 1 ms 596 KB Output is correct
96 Correct 2 ms 1236 KB Output is correct
97 Correct 1 ms 596 KB Output is correct
98 Correct 1 ms 852 KB Output is correct
99 Correct 1 ms 468 KB Output is correct
100 Correct 1 ms 724 KB Output is correct
101 Correct 4 ms 3668 KB Output is correct
102 Correct 1 ms 340 KB Output is correct
103 Correct 2069 ms 17748 KB Output is correct
104 Correct 2043 ms 14544 KB Output is correct
105 Correct 2053 ms 14636 KB Output is correct
106 Correct 1621 ms 2488 KB Output is correct
107 Correct 1660 ms 2100 KB Output is correct
108 Correct 2086 ms 18408 KB Output is correct
109 Correct 2029 ms 18680 KB Output is correct
110 Correct 1 ms 468 KB Output is correct
111 Correct 1 ms 340 KB Output is correct
112 Correct 1 ms 468 KB Output is correct
113 Correct 1 ms 340 KB Output is correct
114 Correct 1 ms 596 KB Output is correct
115 Correct 2213 ms 18636 KB Output is correct
116 Correct 927 ms 17500 KB Output is correct
117 Correct 887 ms 17468 KB Output is correct
118 Correct 959 ms 17496 KB Output is correct
119 Correct 2078 ms 18276 KB Output is correct
120 Correct 2241 ms 18192 KB Output is correct
121 Correct 2189 ms 18204 KB Output is correct
122 Correct 1761 ms 2344 KB Output is correct
123 Correct 1744 ms 2060 KB Output is correct
124 Correct 2141 ms 18432 KB Output is correct
125 Correct 2157 ms 18888 KB Output is correct
126 Correct 1 ms 468 KB Output is correct
127 Correct 1 ms 340 KB Output is correct
128 Correct 2 ms 596 KB Output is correct
129 Correct 1 ms 340 KB Output is correct
130 Correct 1 ms 596 KB Output is correct
131 Correct 31 ms 15452 KB Output is correct
132 Correct 2687 ms 18680 KB Output is correct
133 Correct 3312 ms 18632 KB Output is correct
134 Correct 3124 ms 18792 KB Output is correct
135 Correct 2743 ms 18732 KB Output is correct
136 Correct 3005 ms 30520 KB Output is correct
137 Correct 2714 ms 29748 KB Output is correct
138 Correct 2528 ms 29864 KB Output is correct
139 Correct 1784 ms 14144 KB Output is correct
140 Correct 1915 ms 13812 KB Output is correct
141 Correct 2001 ms 30328 KB Output is correct
142 Correct 2444 ms 30420 KB Output is correct