Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

c - 在0和1的2d数组中,如何找到链接为0的矩形数?(In 2d array of 0 and 1 , how to find numbers of rectangle with linked 0?)

How do you find the number of rectangles in a 2D matrix of 0s and 1s?

(如何在2s为0和1s的矩阵中找到矩形的数目?)

I have searched for it on google , i found answer like link, tried to code like question of upper link , but my question is a little bit different.

(我已经在google上搜索了它,发现了类似链接的答案,试图对上链接的问题进行编码,但是我的问题有点不同。)

I should count rectangle with all linked-0s.

(我应该用所有链接的0来计数矩形。)

So if 2x2 array is only filled with 0s, result should be 0 , not 9 (4 of 1x1, 4 of 1x2, 1 of 2x2)

(因此,如果2x2数组仅填充0,则结果应为0,而不是9(1x1中的4、1x2中的4、2x2中的1))

  ask by Byeongyoon translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...