Redian新闻
>
为啥cell reads是44啊?哪位给解释下?多谢了
avatar
为啥cell reads是44啊?哪位给解释下?多谢了# JobHunting - 待字闺中
b*5
1
A Blob is a shape in two-dimensional integer coordinate space where all
cells have at least one adjoining cell to the right, left, top, or bottom
that is also occupied. Given a 10x10 array of boolean values that represents
a Blob uniformly selected at random from the set of all possible Blobs that
could occupy that array, write a program that will determine the Blob
boundaries.
Optimize first for finding the correct result, second for performing a
minimum number of cell
Boolean value reads, and third for the elegance and clarity of the solution.
Sample input:
0000000000
0011100000
0011111000
0010001000
0011111000
0000101000
0000101000
0000111000
0000000000
0000000000
Sample output:
Cell Reads: 44
Top: 1
Left: 2
Bottom: 7
Right: 6
为啥结果是44啊?哪位给解释下?多谢了
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。