QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#166510#7120. Socceryoungsystem#54 171ms66744kbC++142.7kb2023-09-06 14:09:412023-09-06 14:09:41

Judging History

你现在查看的是测评时间为 2023-09-06 14:09:41 的历史记录

  • [2024-04-28 07:32:55]
  • 管理员手动重测本题所有提交记录
  • 测评结果:54
  • 用时:158ms
  • 内存:67616kb
  • [2023-09-06 14:09:41]
  • 评测
  • 测评结果:54
  • 用时:171ms
  • 内存:66744kb
  • [2023-09-06 14:09:41]
  • 提交

answer

#include "soccer.h"
#include<bits/stdc++.h>
using namespace std;
int f[35][35][35][35]; 
int now[35][35];
int s[2005][2005],qzh[2005][2005];
int nl[2005],nr[2005];
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
	int sl=0,ni=0,nj=0;
	for(int i=1;i<=N;i++)
	{
		nl[i]=-1;
		nr[i]=-2;
		for(int j=1;j<=N;j++)
		{
			s[i][j]=F[i-1][j-1];
			qzh[i][j]=qzh[i][j-1]+s[i][j];
			sl+=s[i][j];
			if(s[i][j]==0)
			{
				if(nl[i]==0)nl[i]=j;
				nr[i]=j;
			}
			if(s[i][j]==1)
			{
				ni=i;
				nj=j;
			}
		}
	}
	if(sl==0)return N*N;
	if(sl==1)return N*N-min(ni,N-ni+1)*min(nj,N-nj+1);
	if(N>30)
	{
		for(int i=1;i<=N;i++)if(nl[i]!=-1&&qzh[i][nr[i]]-qzh[i][nl[i]-1]!=0)return 0;
		int tl=1,tr=N,zl=0,zr=0;
		while(nl[tl]==-1)tl++;
		while(nl[tr]==-1)tr--;
		if(nr[tl]-nl[tl]+1<=nr[tr]-nl[tr]+1)
		{
			tl++;
			zl=nl[tl-1];
			zr=nr[tl-1];
		}
		else
		{
			tr--;
			zl=nl[tr+1];
			zr=nr[tr+1];
		}
		while(tl<=tr)
		{
			if(nr[tl]-nl[tl]+1<=nr[tr]-nl[tr]+1)
			{
				tl++;
				if(nl[tl-1]>zl||nr[tl-1]<zr)return 0;
				zl=nl[tl-1];
				zr=nr[tl-1];
			}
			else
			{
				tr--;
				if(nl[tr+1]>zl||nr[tr+1]<zr)return 0;
				zl=nl[tr+1];
				zr=nr[tr+1];
			}
		}
		//printf("%d %d\n",tl,tr);
		int ans=0;
		for(int i=1;i<=N;i++)for(int j=1;j<=N;j++)if(s[i][j]==0)ans++;
		return ans;
	}
	for(int i=0;i<=N;i++)
	{
		for(int j=0;j<=N-i;j++)
		{
			if(i+j==N)continue; 
			for(int k=1;k<=N;k++)
			{
				for(int l=k;l<=N;l++)
				{
					if(qzh[i+1][l]-qzh[i+1][k-1]!=0)now[k][l]=0;
					else now[k][l]=f[i][j][k][l]+l-k+1;
				}
			}
			for(int k=N;k>=1;k--)
			{
				for(int l=k;l<=N;l++)
				{
					if(k>1&&qzh[i+1][l]-qzh[i+1][k-2]==0)now[k-1][l]=max(now[k-1][l],now[k][l]+1);
					if(l<N&&qzh[i+1][l+1]-qzh[i+1][k-1]==0)now[k][l+1]=max(now[k][l+1],now[k][l]+1);
				}
			}
			for(int k=1;k<=N;k++)
			{
				for(int l=k;l<=N;l++)
				{
					f[i+1][j][k][l]=max(f[i+1][j][k][l],now[k][l]);
				}
			}
			for(int k=1;k<=N;k++)
			{
				for(int l=k;l<=N;l++)
				{
					if(qzh[N-j][l]-qzh[N-j][k-1]!=0)now[k][l]=0;
					else now[k][l]=f[i][j][k][l]+l-k+1;
				}
			}
			for(int k=N;k>=1;k--)
			{
				for(int l=k;l<=N;l++)
				{
					if(k>1&&qzh[N-j][l]-qzh[N-j][k-2]==0)now[k-1][l]=max(now[k-1][l],now[k][l]+1);
					if(l<N&&qzh[N-j][l+1]-qzh[N-j][k-1]==0)now[k][l+1]=max(now[k][l+1],now[k][l]+1);
				}
			}
			for(int k=1;k<=N;k++)
			{
				for(int l=k;l<=N;l++)
				{
					f[i][j+1][k][l]=max(f[i][j+1][k][l],now[k][l]);
				}
			}
		}
	}
	int ans=0;
	for(int k=0;k<=N;k++)
	{
		for(int l=1;l<=N;l++)
		{
			for(int r=l;r<=N;r++)
			{
				//printf("%d %d %d %d %d\n",k,N-k,l,r,f[k][N-k][l][r]);
				ans=max(ans,f[k][N-k][l][r]);
			}
		}
	}
    return ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 1ms
memory: 5836kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

score: 6
Accepted
time: 1ms
memory: 5708kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 0
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #3:

score: 6
Accepted
time: 3ms
memory: 8244kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9850

result:

ok ok

Test #4:

score: 6
Accepted
time: 15ms
memory: 14756kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
236536

result:

ok ok

Test #5:

score: 6
Accepted
time: 171ms
memory: 66744kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
3786181

result:

ok ok

Test #6:

score: 6
Accepted
time: 2ms
memory: 5784kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
9
1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
80

result:

ok ok

Test #7:

score: 6
Accepted
time: 2ms
memory: 5872kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
10
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
99

result:

ok ok

Test #8:

score: 6
Accepted
time: 2ms
memory: 5700kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Test #9:

score: 6
Accepted
time: 0ms
memory: 5708kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Subtask #2:

score: 8
Accepted

Test #10:

score: 8
Accepted
time: 0ms
memory: 5896kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 0
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #11:

score: 8
Accepted
time: 2ms
memory: 5876kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 1
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #12:

score: 8
Accepted
time: 0ms
memory: 5696kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 0
1 1 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #13:

score: 8
Accepted
time: 1ms
memory: 7788kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
1 0 0
1 0 1
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
4

result:

ok ok

Test #14:

score: 8
Accepted
time: 2ms
memory: 5768kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #15:

score: 8
Accepted
time: 2ms
memory: 5820kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 1
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
7

result:

ok ok

Test #16:

score: 8
Accepted
time: 1ms
memory: 5808kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9

result:

ok ok

Test #17:

score: 8
Accepted
time: 2ms
memory: 5768kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
1 0 0
0 1 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #18:

score: 8
Accepted
time: 1ms
memory: 5768kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
1 1 1
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
2

result:

ok ok

Test #19:

score: 8
Accepted
time: 2ms
memory: 5876kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
1 0 1
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
3

result:

ok ok

Test #20:

score: 8
Accepted
time: 0ms
memory: 7744kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
1 0 1
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Subtask #3:

score: 22
Accepted

Dependency #2:

100%
Accepted

Test #21:

score: 22
Accepted
time: 2ms
memory: 5920kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 0 0 0 0 1 0
0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
43

result:

ok ok

Test #22:

score: 22
Accepted
time: 0ms
memory: 6036kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 0 0
1 0 0 0 0 1 0
0 0 0 0 1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
35

result:

ok ok

Test #23:

score: 22
Accepted
time: 2ms
memory: 5880kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 1 0 0 0
0 0 0 0 0 1 0
0 1 0 0 0 0 0
0 0 0 0 1 0 0
0 0 0 0 1 0 0
1 0 0 0 0 1 0
0 1 0 0 1 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
18

result:

ok ok

Test #24:

score: 22
Accepted
time: 0ms
memory: 5856kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 1 1 0 1 0
1 1 0 0 0 1 0
0 1 0 0 0 0 1
0 0 0 1 1 1 0
0 0 1 0 1 0 0
1 0 1 0 0 1 1
0 1 1 0 1 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Test #25:

score: 22
Accepted
time: 2ms
memory: 5912kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 1 1 0 0 1
1 1 1 1 1 1 1
0 0 0 1 1 1 1
1 1 1 1 0 1 1
1 1 1 1 1 0 1
1 0 0 0 0 0 0
1 0 0 1 0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9

result:

ok ok

Test #26:

score: 22
Accepted
time: 2ms
memory: 7764kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 0 1 1
1 1 1 0 0 0 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #27:

score: 22
Accepted
time: 2ms
memory: 7796kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 0 1 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1
1 1 0 0 0 1 1
1 0 0 0 0 1 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
12

result:

ok ok

Test #28:

score: 22
Accepted
time: 0ms
memory: 8008kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 0 1 1 1 1 1
0 0 1 1 1 1 1
0 0 0 0 1 1 1
0 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 1 1 1 1 1
1 0 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
13

result:

ok ok

Test #29:

score: 22
Accepted
time: 2ms
memory: 7796kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 0 1 1 1
0 0 0 0 1 1 1
0 0 0 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
12

result:

ok ok

Test #30:

score: 22
Accepted
time: 2ms
memory: 7988kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 0 0 1 1 1
0 0 0 0 0 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
10

result:

ok ok

Test #31:

score: 22
Accepted
time: 0ms
memory: 7852kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 0 1 1 1
1 1 1 0 1 1 1
1 1 0 0 0 1 1
1 0 0 0 0 0 0
0 0 0 0 0 0 0
1 1 1 0 0 0 1
1 1 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
20

result:

ok ok

Test #32:

score: 22
Accepted
time: 0ms
memory: 6000kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
21

result:

ok ok

Subtask #4:

score: 18
Accepted

Dependency #3:

100%
Accepted

Test #33:

score: 18
Accepted
time: 2ms
memory: 7864kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 0 0 0 1 1 1
0 0 0 0 0 0 0
1 0 0 0 0 0 0
1 1 0 0 0 0 0
1 1 0 0 0 1 1
1 1 1 0 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
24

result:

ok ok

Test #34:

score: 18
Accepted
time: 4ms
memory: 8320kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0
0 0 0 0 1 1 0 0 0 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
106

result:

ok ok

Test #35:

score: 18
Accepted
time: 0ms
memory: 8316kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0
0 0 0 0 1 1 0 1 1 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
63

result:

ok ok

Test #36:

score: 18
Accepted
time: 0ms
memory: 8344kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 0 0 0
1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 0
0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0
0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0
0 1 1 0 1 1 0 1 1 1 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
17

result:

ok ok

Test #37:

score: 18
Accepted
time: 0ms
memory: 8920kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1
1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1
0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1
1 1 1 0 1 1 0 1 1 1 1 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #38:

score: 18
Accepted
time: 1ms
memory: 9072kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
130

result:

ok ok

Test #39:

score: 18
Accepted
time: 4ms
memory: 8884kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
255

result:

ok ok

Test #40:

score: 18
Accepted
time: 2ms
memory: 9424kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
120

result:

ok ok

Test #41:

score: 18
Accepted
time: 5ms
memory: 10248kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
129

result:

ok ok

Test #42:

score: 18
Accepted
time: 1ms
memory: 10140kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
168

result:

ok ok

Test #43:

score: 18
Accepted
time: 0ms
memory: 8908kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
216

result:

ok ok

Test #44:

score: 18
Accepted
time: 5ms
memory: 8308kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
587

result:

ok ok

Test #45:

score: 18
Accepted
time: 2ms
memory: 8316kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
435

result:

ok ok

Subtask #5:

score: 0
Wrong Answer

Dependency #4:

100%
Accepted

Test #46:

score: 0
Wrong Answer
time: 14ms
memory: 14176kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
224794

result:

wrong answer wrong

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

0%