Submission #1095957

# Submission time Handle Problem Language Result Execution time Memory
1095957 2024-10-03T13:12:35 Z 8pete8 Council (JOI23_council) C++17
100 / 100
601 ms 360124 KB
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<cassert>
#include<unordered_map>
#include <queue>
#include <cstdint>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric>
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-lopps")
#define int long long
#define double long double
using namespace std;
const int mod=998244353,mxn=3e5+5,inf=1e18,minf=-1e18,lg=30;
//#undef int
int n,k,m,q;
void setIO(string name){		
	ios_base::sync_with_stdio(0); cin.tie(0);		
	freopen((name+".in").c_str(),"r",stdin);		
	freopen((name+".out").c_str(),"w",stdout);	
}
pii dp[21][(1LL<<20)];
void put(pii &a,int x){
	if(a.f>=x)a.s=a.f,a.f=x;
	else if(a.s>x)a.s=x;
}
void put2(pii &a,pii x,int add){
    if(x.f!=inf)put(a,x.f+add);
    if(x.s!=inf)put(a,x.s+add);
}
void print(int x){
    for(int i=0;i<m;i++)cout<<(!!(x&(1LL<<i)))<<" ";
    cout<<'\n';
}
int keep[mxn+10],cnt[mxn+10];
int32_t main(){
    fastio
	cin>>n>>m;
	for(int i=0;i<=m;i++)for(int j=0;j<(1LL<<m);j++)dp[i][j]={inf,inf};
	for(int i=0;i<n;i++){
		int mask=0,c=0;
		for(int j=0;j<m;j++){
			int a;cin>>a;
			if(a)mask+=(1LL<<j),c++,cnt[j]++;
		}
		keep[i]=mask;
		put(dp[0][mask],c);
	}
	for(int i=0;i<m;i++){
		for(int j=0;j<(1LL<<m);j++){
			put2(dp[i+1][j],dp[i][j],0);
			put2(dp[i+1][j^(1LL<<i)],dp[i][j],-(!!(j&(1LL<<i))));
		}
	}
	for(int i=0;i<n;i++){
		int mask=0,cant=0,ans=0,ans2=0;
		for(int j=0;j<m;j++)cnt[j]-=(!!(keep[i]&(1LL<<j)));
		for(int j=0;j<m;j++){
			if(cnt[j]==(n/2)){
				mask+=(1LL<<j);
				if((keep[i]&(1LL<<j)))cant++;
				ans2++;
			}
			else if(cnt[j]>(n)/2)ans++;
		}
		if(dp[m][mask].f==cant)ans2-=dp[m][mask].s;
		else ans2-=dp[m][mask].f;
		cout<<ans+ans2<<'\n';
		for(int j=0;j<m;j++)cnt[j]+=(!!(keep[i]&(1LL<<j)));
	}
}
/*
we can do subset dp but when we try to remove/add a bit we might add/remove it back
which will be incorrect
try keeping of "done" prefix
where at pos i we can decide what to do with the ith bit
then dont touch that bit ever again

do dp[done][x]
dp[done+1][x]=chmin(dp[done][x])
dp[done+1][x^(1<<done)]=chmin(dp[done][x]-(x&(1<<done)))
if turning off a bit -1

keep 2 answer if the first answer is the same as selecting the ith person use answer 2


*/

Compilation message

council.cpp:32:40: warning: bad option '-funroll-lopps' to pragma 'optimize' [-Wpragmas]
   32 | #pragma GCC optimize ("03,unroll-lopps")
      |                                        ^
council.cpp:39:23: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   39 | void setIO(string name){
      |                       ^
council.cpp:45:22: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   45 | void put(pii &a,int x){
      |                      ^
council.cpp:49:31: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   49 | void put2(pii &a,pii x,int add){
      |                               ^
council.cpp:53:17: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   53 | void print(int x){
      |                 ^
council.cpp:58:14: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   58 | int32_t main(){
      |              ^
council.cpp: In function 'void setIO(std::string)':
council.cpp:41:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   41 |  freopen((name+".in").c_str(),"r",stdin);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
council.cpp:42:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   42 |  freopen((name+".out").c_str(),"w",stdout);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 1232 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 150 ms 345016 KB Output is correct
6 Correct 142 ms 345168 KB Output is correct
7 Correct 140 ms 345172 KB Output is correct
8 Correct 162 ms 345168 KB Output is correct
9 Correct 186 ms 345172 KB Output is correct
10 Correct 163 ms 345168 KB Output is correct
11 Correct 183 ms 345172 KB Output is correct
12 Correct 206 ms 345168 KB Output is correct
13 Correct 1 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 392 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 604 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 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 1 ms 464 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 464 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 1 ms 344 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 1 ms 600 KB Output is correct
40 Correct 1 ms 656 KB Output is correct
41 Correct 2 ms 4416 KB Output is correct
42 Correct 2 ms 4188 KB Output is correct
43 Correct 2 ms 4436 KB Output is correct
44 Correct 2 ms 4188 KB Output is correct
45 Correct 3 ms 4188 KB Output is correct
46 Correct 23 ms 37552 KB Output is correct
47 Correct 24 ms 37468 KB Output is correct
48 Correct 21 ms 37468 KB Output is correct
49 Correct 17 ms 37468 KB Output is correct
50 Correct 19 ms 37548 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 1232 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 150 ms 345016 KB Output is correct
6 Correct 142 ms 345168 KB Output is correct
7 Correct 140 ms 345172 KB Output is correct
8 Correct 162 ms 345168 KB Output is correct
9 Correct 186 ms 345172 KB Output is correct
10 Correct 163 ms 345168 KB Output is correct
11 Correct 183 ms 345172 KB Output is correct
12 Correct 206 ms 345168 KB Output is correct
13 Correct 1 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 392 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 604 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 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 1 ms 464 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 464 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 1 ms 344 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 1 ms 600 KB Output is correct
40 Correct 1 ms 656 KB Output is correct
41 Correct 2 ms 4416 KB Output is correct
42 Correct 2 ms 4188 KB Output is correct
43 Correct 2 ms 4436 KB Output is correct
44 Correct 2 ms 4188 KB Output is correct
45 Correct 3 ms 4188 KB Output is correct
46 Correct 23 ms 37552 KB Output is correct
47 Correct 24 ms 37468 KB Output is correct
48 Correct 21 ms 37468 KB Output is correct
49 Correct 17 ms 37468 KB Output is correct
50 Correct 19 ms 37548 KB Output is correct
51 Correct 143 ms 345172 KB Output is correct
52 Correct 153 ms 345088 KB Output is correct
53 Correct 239 ms 345168 KB Output is correct
54 Correct 248 ms 345172 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 33 ms 37468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 37 ms 4588 KB Output is correct
3 Correct 34 ms 4464 KB Output is correct
4 Correct 27 ms 3892 KB Output is correct
5 Correct 36 ms 4432 KB Output is correct
6 Correct 27 ms 3928 KB Output is correct
7 Correct 50 ms 4488 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 1 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 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 37 ms 4588 KB Output is correct
3 Correct 34 ms 4464 KB Output is correct
4 Correct 27 ms 3892 KB Output is correct
5 Correct 36 ms 4432 KB Output is correct
6 Correct 27 ms 3928 KB Output is correct
7 Correct 50 ms 4488 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 1 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 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 143 ms 9452 KB Output is correct
21 Correct 127 ms 8728 KB Output is correct
22 Correct 128 ms 8784 KB Output is correct
23 Correct 130 ms 9808 KB Output is correct
24 Correct 110 ms 9296 KB Output is correct
25 Correct 132 ms 9300 KB Output is correct
26 Correct 149 ms 9344 KB Output is correct
27 Correct 1 ms 604 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 0 ms 344 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 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 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 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 604 KB Output is correct
44 Correct 1 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 37 ms 4588 KB Output is correct
3 Correct 34 ms 4464 KB Output is correct
4 Correct 27 ms 3892 KB Output is correct
5 Correct 36 ms 4432 KB Output is correct
6 Correct 27 ms 3928 KB Output is correct
7 Correct 50 ms 4488 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 1 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 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 143 ms 9452 KB Output is correct
21 Correct 127 ms 8728 KB Output is correct
22 Correct 128 ms 8784 KB Output is correct
23 Correct 130 ms 9808 KB Output is correct
24 Correct 110 ms 9296 KB Output is correct
25 Correct 132 ms 9300 KB Output is correct
26 Correct 149 ms 9344 KB Output is correct
27 Correct 1 ms 604 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 0 ms 344 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 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 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 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 604 KB Output is correct
44 Correct 1 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 1384 KB Output is correct
47 Correct 197 ms 15492 KB Output is correct
48 Correct 185 ms 12880 KB Output is correct
49 Correct 185 ms 12800 KB Output is correct
50 Correct 179 ms 15696 KB Output is correct
51 Correct 159 ms 15412 KB Output is correct
52 Correct 182 ms 15448 KB Output is correct
53 Correct 203 ms 15680 KB Output is correct
54 Correct 2 ms 4188 KB Output is correct
55 Correct 2 ms 4188 KB Output is correct
56 Correct 3 ms 4188 KB Output is correct
57 Correct 2 ms 4304 KB Output is correct
58 Correct 2 ms 4188 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 37 ms 4588 KB Output is correct
3 Correct 34 ms 4464 KB Output is correct
4 Correct 27 ms 3892 KB Output is correct
5 Correct 36 ms 4432 KB Output is correct
6 Correct 27 ms 3928 KB Output is correct
7 Correct 50 ms 4488 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 1 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 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 143 ms 9452 KB Output is correct
21 Correct 127 ms 8728 KB Output is correct
22 Correct 128 ms 8784 KB Output is correct
23 Correct 130 ms 9808 KB Output is correct
24 Correct 110 ms 9296 KB Output is correct
25 Correct 132 ms 9300 KB Output is correct
26 Correct 149 ms 9344 KB Output is correct
27 Correct 1 ms 604 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 0 ms 344 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 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 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 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 604 KB Output is correct
44 Correct 1 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 1384 KB Output is correct
47 Correct 197 ms 15492 KB Output is correct
48 Correct 185 ms 12880 KB Output is correct
49 Correct 185 ms 12800 KB Output is correct
50 Correct 179 ms 15696 KB Output is correct
51 Correct 159 ms 15412 KB Output is correct
52 Correct 182 ms 15448 KB Output is correct
53 Correct 203 ms 15680 KB Output is correct
54 Correct 2 ms 4188 KB Output is correct
55 Correct 2 ms 4188 KB Output is correct
56 Correct 3 ms 4188 KB Output is correct
57 Correct 2 ms 4304 KB Output is correct
58 Correct 2 ms 4188 KB Output is correct
59 Correct 224 ms 30548 KB Output is correct
60 Correct 127 ms 42576 KB Output is correct
61 Correct 138 ms 42832 KB Output is correct
62 Correct 129 ms 43092 KB Output is correct
63 Correct 247 ms 30384 KB Output is correct
64 Correct 268 ms 50256 KB Output is correct
65 Correct 252 ms 50276 KB Output is correct
66 Correct 222 ms 50632 KB Output is correct
67 Correct 201 ms 50316 KB Output is correct
68 Correct 252 ms 50260 KB Output is correct
69 Correct 275 ms 50720 KB Output is correct
70 Correct 22 ms 37468 KB Output is correct
71 Correct 18 ms 37552 KB Output is correct
72 Correct 18 ms 37508 KB Output is correct
73 Correct 17 ms 37468 KB Output is correct
74 Correct 19 ms 37468 KB Output is correct
75 Correct 32 ms 37468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 1232 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 150 ms 345016 KB Output is correct
6 Correct 142 ms 345168 KB Output is correct
7 Correct 140 ms 345172 KB Output is correct
8 Correct 162 ms 345168 KB Output is correct
9 Correct 186 ms 345172 KB Output is correct
10 Correct 163 ms 345168 KB Output is correct
11 Correct 183 ms 345172 KB Output is correct
12 Correct 206 ms 345168 KB Output is correct
13 Correct 1 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 392 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 604 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 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 1 ms 464 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 464 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 1 ms 344 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 1 ms 600 KB Output is correct
40 Correct 1 ms 656 KB Output is correct
41 Correct 2 ms 4416 KB Output is correct
42 Correct 2 ms 4188 KB Output is correct
43 Correct 2 ms 4436 KB Output is correct
44 Correct 2 ms 4188 KB Output is correct
45 Correct 3 ms 4188 KB Output is correct
46 Correct 23 ms 37552 KB Output is correct
47 Correct 24 ms 37468 KB Output is correct
48 Correct 21 ms 37468 KB Output is correct
49 Correct 17 ms 37468 KB Output is correct
50 Correct 19 ms 37548 KB Output is correct
51 Correct 143 ms 345172 KB Output is correct
52 Correct 153 ms 345088 KB Output is correct
53 Correct 239 ms 345168 KB Output is correct
54 Correct 248 ms 345172 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 33 ms 37468 KB Output is correct
57 Correct 1 ms 348 KB Output is correct
58 Correct 37 ms 4588 KB Output is correct
59 Correct 34 ms 4464 KB Output is correct
60 Correct 27 ms 3892 KB Output is correct
61 Correct 36 ms 4432 KB Output is correct
62 Correct 27 ms 3928 KB Output is correct
63 Correct 50 ms 4488 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 1 ms 348 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 348 KB Output is correct
74 Correct 0 ms 344 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 143 ms 9452 KB Output is correct
77 Correct 127 ms 8728 KB Output is correct
78 Correct 128 ms 8784 KB Output is correct
79 Correct 130 ms 9808 KB Output is correct
80 Correct 110 ms 9296 KB Output is correct
81 Correct 132 ms 9300 KB Output is correct
82 Correct 149 ms 9344 KB Output is correct
83 Correct 1 ms 604 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 1 ms 348 KB Output is correct
87 Correct 0 ms 344 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 604 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 1 ms 604 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 0 ms 348 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 604 KB Output is correct
100 Correct 1 ms 604 KB Output is correct
101 Correct 1 ms 604 KB Output is correct
102 Correct 1 ms 1384 KB Output is correct
103 Correct 197 ms 15492 KB Output is correct
104 Correct 185 ms 12880 KB Output is correct
105 Correct 185 ms 12800 KB Output is correct
106 Correct 179 ms 15696 KB Output is correct
107 Correct 159 ms 15412 KB Output is correct
108 Correct 182 ms 15448 KB Output is correct
109 Correct 203 ms 15680 KB Output is correct
110 Correct 2 ms 4188 KB Output is correct
111 Correct 2 ms 4188 KB Output is correct
112 Correct 3 ms 4188 KB Output is correct
113 Correct 2 ms 4304 KB Output is correct
114 Correct 2 ms 4188 KB Output is correct
115 Correct 224 ms 30548 KB Output is correct
116 Correct 127 ms 42576 KB Output is correct
117 Correct 138 ms 42832 KB Output is correct
118 Correct 129 ms 43092 KB Output is correct
119 Correct 247 ms 30384 KB Output is correct
120 Correct 268 ms 50256 KB Output is correct
121 Correct 252 ms 50276 KB Output is correct
122 Correct 222 ms 50632 KB Output is correct
123 Correct 201 ms 50316 KB Output is correct
124 Correct 252 ms 50260 KB Output is correct
125 Correct 275 ms 50720 KB Output is correct
126 Correct 22 ms 37468 KB Output is correct
127 Correct 18 ms 37552 KB Output is correct
128 Correct 18 ms 37508 KB Output is correct
129 Correct 17 ms 37468 KB Output is correct
130 Correct 19 ms 37468 KB Output is correct
131 Correct 32 ms 37468 KB Output is correct
132 Correct 527 ms 360124 KB Output is correct
133 Correct 543 ms 359760 KB Output is correct
134 Correct 531 ms 360024 KB Output is correct
135 Correct 557 ms 360020 KB Output is correct
136 Correct 601 ms 360088 KB Output is correct
137 Correct 398 ms 178768 KB Output is correct
138 Correct 400 ms 179024 KB Output is correct
139 Correct 380 ms 360016 KB Output is correct
140 Correct 391 ms 359764 KB Output is correct
141 Correct 542 ms 359956 KB Output is correct
142 Correct 594 ms 360076 KB Output is correct