QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#163965#7123. Robot ContestQAQAutoMaton#26 209ms4756kbC++141.1kb2023-09-04 17:24:292024-04-28 07:23:19

Judging History

你现在查看的是最新测评结果

  • [2024-04-28 07:23:19]
  • 管理员手动重测本题所有提交记录
  • 测评结果:26
  • 用时:209ms
  • 内存:4756kb
  • [2024-04-21 00:21:22]
  • 管理员手动重测本题所有提交记录
  • 测评结果:26
  • 用时:217ms
  • 内存:4752kb
  • [2023-09-04 17:24:29]
  • 评测
  • 测评结果:26
  • 用时:226ms
  • 内存:6288kb
  • [2023-09-04 17:24:29]
  • 提交

answer

#include "robot.h"

#include<bits/stdc++.h>
// 1 W y-1
// 2 S x+1
// 3 E y+1 
// 4 N x-1
//
// 2 -> to be deleted
// 3 4 5 6 -> WSEN
// 7 8 9 10 -> del WSEN
const char s[]="WSEN";
const char r[]="ENWS";
void check(std::vector<int> v){
	int fr=-1;
	for(int i=1;i<=4;++i)if(v[i]>=3 && r[v[i]-3]==s[i-1]){
		fr=i-1;
		break;
	}
	if(v[2]==-2 && v[3]==-2){
		if(~fr)set_instruction(v,1,s[fr]);
		else set_instruction(v,1,'T');
		return;
	}
	int end=0;
	for(int i=1;i<=4;++i)if(v[i]==1)end=i;
	if(end){
		for(int i=2;i<=3;++i)if(v[i]==2){
			set_instruction(v,1,s[i-1]);
			return;
		}
		if(~fr)set_instruction(v,1,s[fr]);
		else if(v[1]==-2 && v[4]==-2)set_instruction(v,1,'T');
		else set_instruction(v,0,s[end-1]);
	}
	else{
		for(int i=2;i<=3;++i)if(v[i]==0){
			set_instruction(v,i+2,s[i-1]);
			return;
		}
		if(~fr)set_instruction(v,2,s[fr]);
		else set_instruction(v,1,'T');
	}
}
void program_pulibot()
{
	for(int a=-2;a<=6;++a)
		for(int b=-2;b<=6;++b)
			for(int c=-2;c<=6;++c)
				for(int d=-2;d<=6;++d)
					for(int e=-2;e<=6;++e){
						check({a,b,c,d,e});
					}
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 189ms
memory: 4272kb

input:

4 8
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #2:

score: 6
Accepted
time: 185ms
memory: 4676kb

input:

12 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
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #3:

score: 6
Accepted
time: 189ms
memory: 4384kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 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:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #4:

score: 6
Accepted
time: 194ms
memory: 4680kb

input:

2 2
0 0
0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #5:

score: 6
Accepted
time: 197ms
memory: 4748kb

input:

2 3
0 0 0
0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #6:

score: 6
Accepted
time: 197ms
memory: 4376kb

input:

2 4
0 0 0 0
0 0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #7:

score: 6
Accepted
time: 191ms
memory: 4376kb

input:

2 10
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #8:

score: 6
Accepted
time: 194ms
memory: 4304kb

input:

2 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 185ms
memory: 4488kb

input:

2 15
0 1 0 0 0 1 0 0 0 1 0 1 0 0 0
0 0 0 1 0 0 0 1 0 0 0 0 0 1 0
t

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

wrong answer Not a path

Subtask #3:

score: 0
Wrong Answer

Test #28:

score: 0
Wrong Answer
time: 189ms
memory: 4444kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 0 1 1 1 1 1 1 1 0 1 1 0
1 0 1 1 0 0 0 0 0 0 0 1 0 1 0
0 0 0 0 1 1 0 1 1 0 1 1 0 1 0
1 0 1 0 1 0 0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 1 1 0 1 0 1 0
1 0 1 0 1 0 1 0 0 0 1 0 1 0 1
0 0 0 1 0 1 0 0 1 0 0 0 0 0 0
0 1 1 1 0 0 0 1 0 0 1 1 1 1 0
0 1 0 0 0 1 1 0 1 0 1 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

wrong answer Not a path

Subtask #4:

score: 20
Accepted

Test #40:

score: 20
Accepted
time: 203ms
memory: 4444kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 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 1 0 1 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 1 0 1 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 1 0 1 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 1 0 1 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #41:

score: 20
Accepted
time: 200ms
memory: 4640kb

input:

15 15
0 0 0 0 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 1 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 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 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 0 0 0 0 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #42:

score: 20
Accepted
time: 190ms
memory: 4448kb

input:

15 15
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 1 0 0 0 0 0
0 0 0 1 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 1 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 1 0 0 1 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 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #43:

score: 20
Accepted
time: 193ms
memory: 4644kb

input:

15 15
0 0 0 0 0 0 1 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 1 0 1 0 0 0 0 1
1 0 0 0 0 0 1 0 0 0 0 1 1 1 0
0 1 0 0 0 0 0 0 0 1 0 1 0 1 0
0 0 0 0 0 0 0 0 1 1 0 0 0 0 1
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0 1 0 0 1 0
1 0 0 0 0 0 0 1 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #44:

score: 20
Accepted
time: 194ms
memory: 4380kb

input:

15 15
0 0 0 0 1 0 0 0 0 0 1 1 0 1 0
0 0 1 0 0 0 0 0 1 0 0 0 0 0 1
1 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 1 0
0 0 0 1 0 0 0 0 0 0 1 0 1 0 0
0 1 0 0 0 1 0 0 0 0 0 1 1 0 0
1 1 1 0 0 1 0 1 0 0 0 1 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 1 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 1 1 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #45:

score: 20
Accepted
time: 200ms
memory: 4380kb

input:

15 15
0 1 1 1 0 1 1 1 0 1 1 0 0 1 0
0 0 0 0 0 0 0 1 1 0 1 0 0 0 0
0 0 1 1 1 0 0 1 0 0 0 1 0 1 1
0 0 0 0 0 1 1 0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 1 0 0 0 1 1 0 0
1 0 0 0 0 0 1 1 0 0 0 1 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0 1 1 1
1 1 1 0 1 0 0 0 0 1 0 0 1 0 0
1 0 0 0 0 0 1 0 0 1 0 0 1 1 0
0 0 1 0 0 0 0 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #46:

score: 20
Accepted
time: 197ms
memory: 4444kb

input:

15 15
0 0 0 1 0 1 1 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 0 0 0 0 1 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 1 0 1 0 1 0 0 0 0 1 1 0
0 0 0 0 0 0 0 1 0 1 1 0 0 0 0
1 0 0 0 0 0 0 0 0 1 0 0 0 1 0
1 1 0 0 0 0 0 0 0 0 0 1 0 1 0
0 1 0 0 0 0 0 0 0 0 0 1 0 1 1
0 0 0 1 0 0 0 0 0 0 1 1 0 0 0
0 1 0 1 0 0 1 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #47:

score: 20
Accepted
time: 203ms
memory: 4380kb

input:

15 15
0 0 1 0 0 0 1 1 1 1 0 0 0 0 1
0 0 1 1 1 0 0 0 0 0 1 1 1 0 1
0 0 1 1 1 0 0 0 0 1 1 1 0 1 0
0 0 1 1 1 0 0 0 0 1 0 0 0 1 0
1 0 0 0 0 0 1 0 0 0 0 0 1 1 0
0 0 0 1 0 0 0 1 1 0 0 1 0 0 1
0 0 1 0 0 0 0 0 1 0 0 0 0 0 0
1 0 0 0 0 1 0 0 1 0 1 0 1 0 1
1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
0 0 0 0 0 0 1 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #48:

score: 20
Accepted
time: 194ms
memory: 4392kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
0 0 1 1 0 0 0 0 0 1 0 0 0 0 1
0 0 0 1 1 0 1 0 1 1 0 1 1 0 0
0 0 0 1 1 1 1 0 0 1 0 0 0 0 1
0 0 0 0 0 0 0 1 1 1 0 0 1 0 1
0 0 1 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 1 0 0 1 1 0 1 1 0 0 1 0
0 0 0 0 0 1 0 1 0 1 0 0 0 0 0
1 1 1 0 0 1 0 0 1 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #49:

score: 20
Accepted
time: 194ms
memory: 4752kb

input:

15 15
0 1 0 0 1 0 0 0 1 1 0 0 0 0 0
0 0 1 1 0 1 1 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 1 1 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 0 0 0 1 1 0
1 0 0 1 0 0 0 0 1 1 0 1 0 0 0
0 0 0 0 1 1 0 1 0 1 0 0 0 0 0
0 0 1 0 0 0 0 0 1 1 0 0 1 1 1
0 1 1 0 0 0 1 1 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 1 1 0 0 0 0 0
0 1 0 0 1 0 0 1 1 1 0 1 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #50:

score: 20
Accepted
time: 197ms
memory: 4416kb

input:

15 15
0 0 0 0 0 1 1 0 1 1 1 0 1 0 1
1 0 1 0 0 0 0 1 1 0 1 1 1 1 1
0 0 1 1 0 1 0 0 0 1 0 1 1 1 1
0 1 0 0 1 0 0 1 1 0 1 0 1 1 0
1 0 1 0 1 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
1 1 0 0 1 1 0 1 0 0 0 0 0 0 0
1 1 1 0 0 0 1 1 1 1 0 1 1 1 0
1 0 1 0 0 1 0 0 0 0 0 1 0 1 1
1 1 0 0 1 0 0 1 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #51:

score: 20
Accepted
time: 199ms
memory: 4440kb

input:

15 15
0 0 0 1 0 0 1 1 0 1 0 1 1 0 1
0 0 0 0 1 0 0 1 1 1 0 1 1 0 0
1 0 0 0 0 1 1 0 0 0 1 0 0 1 0
0 0 0 0 0 1 0 0 0 1 0 1 1 1 0
1 0 1 1 0 0 0 0 1 0 0 0 0 1 1
1 1 0 1 0 0 1 1 1 1 1 1 0 1 0
1 0 1 1 1 0 0 1 0 0 1 0 0 1 0
0 1 0 1 1 0 1 0 1 1 1 0 1 1 1
1 0 0 1 1 0 1 1 0 1 0 0 0 1 0
0 1 1 0 1 0 0 0 0 1 1 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #52:

score: 20
Accepted
time: 197ms
memory: 4376kb

input:

15 15
0 0 0 0 0 0 1 1 0 0 1 1 1 1 1
1 1 1 1 0 0 0 0 1 1 1 0 1 0 1
1 0 1 0 0 0 0 0 0 1 0 0 0 1 1
1 1 0 1 0 0 1 0 0 0 0 0 1 1 1
1 1 0 1 1 0 1 1 0 0 0 0 0 1 1
0 0 1 1 0 0 1 0 1 0 0 1 0 1 0
0 0 0 1 0 0 1 0 1 0 0 1 1 1 1
0 1 1 1 0 0 1 0 1 0 1 0 0 1 1
1 0 0 1 0 0 1 0 1 0 0 0 1 0 1
1 1 0 0 0 0 1 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #53:

score: 20
Accepted
time: 194ms
memory: 4400kb

input:

15 15
0 0 1 1 1 1 0 1 0 1 0 0 0 0 0
1 0 0 0 0 0 1 1 1 0 1 0 1 1 1
0 0 0 0 0 0 1 0 1 0 0 1 0 1 1
0 1 0 0 0 0 0 1 1 0 0 1 0 1 1
0 1 0 0 1 0 0 0 1 0 1 0 0 0 1
1 1 1 0 1 1 1 0 1 0 1 0 0 1 0
1 0 1 0 0 0 0 0 1 1 1 0 0 0 1
0 1 1 0 1 1 0 0 1 0 0 1 0 1 1
0 0 1 1 1 1 1 0 0 1 1 1 0 1 1
1 0 0 1 1 0 0 0 1 1 0 1 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #54:

score: 20
Accepted
time: 185ms
memory: 4444kb

input:

15 15
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 1 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 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 1 0 0
0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 1 0 0 1 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #55:

score: 20
Accepted
time: 207ms
memory: 4752kb

input:

15 15
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 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 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 1 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 1 0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0 1 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #56:

score: 20
Accepted
time: 192ms
memory: 4444kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 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 1 0 0 1 0 0 0 0 0 1 0 0 0
0 0 0 0 1 0 0 0 0 0 1 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 1 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #57:

score: 20
Accepted
time: 204ms
memory: 4756kb

input:

15 15
0 0 0 0 1 0 0 0 0 0 0 1 0 0 0
1 1 0 1 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1 0 0 0
0 0 0 1 0 0 0 1 1 0 0 0 0 0 1
0 0 0 0 1 1 0 0 0 0 0 0 0 1 0
1 0 1 1 0 0 1 1 0 1 1 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 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #58:

score: 20
Accepted
time: 202ms
memory: 4644kb

input:

15 15
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
1 0 0 1 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
1 1 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 0 0 1 0 1 1 0 0
0 0 0 0 0 0 1 0 1 0 1 0 0 0 0
1 0 1 0 0 0 1 0 1 0 0 0 0 0 1
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 1 0 0 0
0 0 0 0 0 1 0 1 0 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #59:

score: 20
Accepted
time: 200ms
memory: 4380kb

input:

15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 1 1 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 1 1 0 1 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 1 0 0 0 0 0 0 0
0 1 0 1 0 1 1 0 0 0 0 0 0 1 1
1 0 1 0 0 1 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1 0 1 0 1 0 1 0 0 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #60:

score: 20
Accepted
time: 197ms
memory: 4388kb

input:

15 15
0 1 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 1 0 0 0 0 0 1 0
0 1 0 1 0 0 1 0 0 0 0 1 0 0 0
1 0 0 1 0 1 0 1 0 0 1 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1 0 0 1 0
0 1 0 1 0 0 0 1 0 0 0 0 0 1 0
0 1 0 0 0 0 1 1 0 0 0 0 0 0 1
0 0 0 1 0 1 0 0 0 0 1 0 0 0 0
0 1 1 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 1 1 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #61:

score: 20
Accepted
time: 193ms
memory: 4388kb

input:

15 15
0 1 0 0 1 0 0 0 0 0 1 0 0 1 0
0 0 0 1 0 0 1 0 0 0 0 0 0 0 0
1 1 0 1 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 0 0 0 0 1 1
1 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0 0
0 0 0 1 1 0 1 1 1 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 0 0 0 1 0
1 0 0 1 0 1 0 1 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0 1 0 0 1 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #62:

score: 20
Accepted
time: 196ms
memory: 4680kb

input:

15 15
0 0 1 1 1 0 1 0 0 1 0 0 1 0 0
1 0 0 0 1 0 0 0 0 1 1 1 0 0 1
0 0 1 0 0 0 0 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 1 0 0 0 1
1 0 1 0 1 0 0 0 1 1 0 0 0 1 0
0 0 0 1 1 0 0 0 1 0 0 0 0 0 0
0 1 0 0 1 0 0 1 0 1 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 1 0 1 0 0 0 0 0 0
0 0 1 0 0 1 0 0 0 1 0 1 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Test #63:

score: 20
Accepted
time: 196ms
memory: 4384kb

input:

15 15
0 0 0 0 0 0 0 1 0 0 0 1 0 0 0
1 0 0 0 0 1 1 0 1 0 1 0 0 0 0
0 0 1 1 1 1 1 0 0 0 1 0 0 0 1
1 0 0 0 0 0 1 1 1 0 0 1 1 0 0
0 0 0 1 0 1 0 0 1 0 1 0 0 0 1
1 1 1 1 0 0 0 0 0 1 1 1 0 0 0
0 0 0 1 0 0 0 1 0 1 1 0 0 0 1
0 1 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 1 1 0 0 0 1 0
0 1 0 1 0 1 0 1 1 1 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

ok 

Subtask #5:

score: 0
Wrong Answer

Test #64:

score: 0
Wrong Answer
time: 209ms
memory: 4676kb

input:

15 15
0 0 0 0 1 0 0 1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 1 1 0 1 1 0
0 0 1 1 1 1 1 1 1 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
0 1 1 1 1 1 1 1 1 0 0 1 0 0 0
0 1 0 0 0 0 0 0 1 1 0 0 1 0 0
0 0 1 0 0 1 0 0 0 0 0 0 0 1 0
0 0 1 0 0 1 1 0 0 1 0 0 0 1 0
0 1 0 0 1 0 0 1 1 0 1 1 1 0 0
0 1 0 0 0 0 0 0 1 0 0 0 ...

output:

p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp
OK
193
193
193
193
193
193
161
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
160
193
193
162
193
193
0
0
0
0
0
0
0
0
0
0
0
0
0
133
133
133
160
133
133
133
133
133
0
0
0
0
0
0
0
0
0
0
0
0
0
193
128
128
160
128
128
161
128
128
0
0
0
0
0
0
0
0
0
0
0
0
0
193
193
193
129
...

result:

wrong answer Not a path