QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#438541#4562. Prisoner Challengeucup-team2335100 ✓10ms6568kbC++145.8kb2024-06-10 19:16:172024-06-10 19:16:21

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 5ms
memory: 4552kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2

result:

ok 

Test #2:

score: 0
Accepted
time: 5ms
memory: 4628kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1
1 -2 -2 3
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2

result:

ok 

Test #3:

score: 0
Accepted
time: 5ms
memory: 4852kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
243 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #4:

score: 0
Accepted
time: 5ms
memory: 4708kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
256 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #5:

score: 0
Accepted
time: 5ms
memory: 4848kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
499 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #6:

score: 0
Accepted
time: 5ms
memory: 4568kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
500 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #7:

score: 0
Accepted
time: 5ms
memory: 4572kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
29 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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
1 -2 -2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
1 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
0 -1 -1 -1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...

result:

ok 

Test #8:

score: 0
Accepted
time: 5ms
memory: 4708kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
380 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #9:

score: 0
Accepted
time: 5ms
memory: 4640kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
411 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Subtask #2:

score: 5
Accepted

Test #10:

score: 5
Accepted
time: 5ms
memory: 4616kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2

result:

ok 

Test #11:

score: 0
Accepted
time: 5ms
memory: 4804kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1
1 -2 -2 3
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2

result:

ok 

Test #12:

score: 0
Accepted
time: 5ms
memory: 4612kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
243 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #13:

score: 0
Accepted
time: 5ms
memory: 4548kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
256 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #14:

score: 0
Accepted
time: 2ms
memory: 4568kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
499 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #15:

score: 0
Accepted
time: 5ms
memory: 4552kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
500 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #16:

score: 0
Accepted
time: 4ms
memory: 4548kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
12 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1 1 1 1 1 1 1 1 1 1
1 -2 -2 3 3 3 3 3 3 3 3 3 3
1 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
0 -1 -1 -1 5 5 5 5 5 5 5 5 5
0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
1 -2 -2 -2 -2 8 8 8 8 8 8 8 8
1 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
1 -2 -2 -2 -2 -2 -2 -2 -2...

result:

ok 

Test #17:

score: 0
Accepted
time: 5ms
memory: 4548kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
138 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #18:

score: 0
Accepted
time: 5ms
memory: 6568kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
469 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Subtask #3:

score: 90
Accepted

Test #19:

score: 90
Accepted
time: 4ms
memory: 4800kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
0 -1 -1
1 -2 -2
1 -2 -2
0 -1 -1
0 -1 -1
1 -2 -2

result:

ok 

Test #20:

score: 90
Accepted
time: 4ms
memory: 4768kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1
1 -2 -2 3
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2

result:

ok 

Test #21:

score: 90
Accepted
time: 7ms
memory: 4568kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2187 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #22:

score: 90
Accepted
time: 9ms
memory: 4600kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4096 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #23:

score: 90
Accepted
time: 10ms
memory: 4548kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4999 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #24:

score: 90
Accepted
time: 10ms
memory: 4620kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
5000 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #25:

score: 90
Accepted
time: 5ms
memory: 4560kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
22 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 -2 -2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
1 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
0 -1 -1 -1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...

result:

ok 

Test #26:

score: 90
Accepted
time: 5ms
memory: 4628kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
376 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #27:

score: 90
Accepted
time: 5ms
memory: 4620kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
662 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #28:

score: 90
Accepted
time: 7ms
memory: 4548kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2010 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #29:

score: 90
Accepted
time: 9ms
memory: 4616kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4030 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #30:

score: 90
Accepted
time: 4ms
memory: 4800kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 0

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
0 -1 1 1
1 -2 -2 3
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2
1 -2 -2 -2
0 -1 -1 -1
0 -1 -1 -1
1 -2 -2 -2

result:

ok