注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
1. example input:
input:. .и
row: 4:
columns = 5
grid:
[[0,1,1,0,1],
[0,1,0,1,0],
[0,0,0,0,1],. 1point3acres.com
[0,1,0,0,0]]
output: 2. Waral dи,
explanation:. 1point 3acres
at the end of first hour:. 1point3acres
1,1,1,1,1
1,1,1,1,1
0,1,0,1,1. check 1point3acres for more.
1,1,1,0,1
at the end of 2 hour:
1,1,1,1,1
1,1,1,1,1
1,1,1,1,1. 1point 3acres
1,1,1,1,1
. ----
2. testcase1. check 1point3acres for more.
input: 4, 4
[[1,1,0,0],. .и
[0,0,0,0],
[0,0,1,1],
[0,0,0,0]] ..
expected return value:
2
. From 1point 3acres bbs
testcase 2:
input: 7, 7. 1point 3acres
[. .и
[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,0,0,0],
[0,0,0,0,1,0,0],. 1point3acres.com
[0,0,0,0,0,1,0],. .и
[0,0,0,0,0,0,1]
]
|