a*w
2 楼
You are given a M x N matrix with 0's and 1's
1. Find the largest square matrix with 1's
2. Find the largest rectangular matrix with 1's
没想出哪种比Brute-force 列举更好的办法,哪位有啥hint?
1. Find the largest square matrix with 1's
2. Find the largest rectangular matrix with 1's
没想出哪种比Brute-force 列举更好的办法,哪位有啥hint?
h*y
3 楼
till 2/28/2011
g*a
4 楼
这是西游降魔不可能更上一个档次的首要原因。再有,大话西游拍得更精致。刘镇伟才
是真正大材呀。周星驰也加了讽喻的元素,但main idea 不是原创。就好比有才网友的
“东北人都是活雷锋之xx版”。
还是不错的,很值得一看。踩它,余心不忍。
原创最可贵。
是真正大材呀。周星驰也加了讽喻的元素,但main idea 不是原创。就好比有才网友的
“东北人都是活雷锋之xx版”。
还是不错的,很值得一看。踩它,余心不忍。
原创最可贵。
a*d
5 楼
I've thought google can help me. They did.
v*6
6 楼
比2.1用的流量多了几倍,我以前2GB一个月最多用1GB,现在10几天就用完2GB了,究竟
生么原因?还有觉得2.2比2.1还要慢,真的想downgrade回2.1。我用的是captivative。
生么原因?还有觉得2.2比2.1还要慢,真的想downgrade回2.1。我用的是captivative。
d*g
7 楼
好大两盆~~~~~能吃好久啊~~~~
b*h
8 楼
How about dynamic programming?
Let S(i,j) be the largest square that ends at row i, column j.
Then
S(i,j) = 0, if (i,j)==0
= min(S(i-1,j), S(i,j-1)) + 1, if (i,j)==1 && S(i-1,j)!=S(i,j-1)
= S(i-1,j) + 1, if (i,j)==1 && S(i-1,j)==S(i,j-1) && (i-k,j-k)==1
The answer is max(S(i,j)). Time complexity is O(m*n).
Let S(i,j) be the largest square that ends at row i, column j.
Then
S(i,j) = 0, if (i,j)==0
= min(S(i-1,j), S(i,j-1)) + 1, if (i,j)==1 && S(i-1,j)!=S(i,j-1)
= S(i-1,j) + 1, if (i,j)==1 && S(i-1,j)==S(i,j-1) && (i-k,j-k)==1
The answer is max(S(i,j)). Time complexity is O(m*n).
g*i
11 楼
大部分估计已经完成2.2-->2.3的转换了吧
n*h
13 楼
我做不到Time complexity O(m*n)
suppose Matrix is m*n (m for the largest square, time O(m*m*n), space O(m*n)
for the largest rectangle, time O((m+n)*m*n), space O(m*n*n)
suppose Matrix is m*n (m
for the largest rectangle, time O((m+n)*m*n), space O(m*n*n)
p*c
16 楼
软件droidwall,可以防止软件使用3g
F*t
17 楼
好大的汤碗
r*u
18 楼
这个可以reduce成find max rectangle in柱状图。考古一下。Another hint: 先找到
每行的连续序列。
e.g., convert 1 0 1 1 1 0 --> 1 0 1 2 3 0.
【在 a***w 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: You are given a M x N matrix with 0's and 1's
: 1. Find the largest square matrix with 1's
: 2. Find the largest rectangular matrix with 1's
: 没想出哪种比Brute-force 列举更好的办法,哪位有啥hint?
每行的连续序列。
e.g., convert 1 0 1 1 1 0 --> 1 0 1 2 3 0.
【在 a***w 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: You are given a M x N matrix with 0's and 1's
: 1. Find the largest square matrix with 1's
: 2. Find the largest rectangular matrix with 1's
: 没想出哪种比Brute-force 列举更好的办法,哪位有啥hint?
l*n
19 楼
怎样才能得到125,有啥要求?谢谢
Y*e
21 楼
这两个盘子贵不?
20 多块一个?
20 多块一个?
l*t
23 楼
牛丸都碎了哇?
s*k
25 楼
实话实说。。
看着没啥食欲。。。
可能跟盛的器皿有关系
看着没啥食欲。。。
可能跟盛的器皿有关系
g*a
26 楼
l*s
27 楼
那个大碗用来吃羊肉拉面很过瘾
h*o
29 楼
做汤哥 LOL
l*i
31 楼
作杂烩汤是不错。不过时间长了就会怀念炒菜的香味了。
l*3
33 楼
赞。。。。
l*2
37 楼
tristen是不是上周也上了2个汤
每周做2个汤,呵呵,挺不错的,省事
每周做2个汤,呵呵,挺不错的,省事
R*D
39 楼
好满足的汤!
g*a
52 楼
这是西游降魔不可能更上一个档次的首要原因。再有,大话西游拍得更精致。刘镇伟才
是真正大材呀。周星驰也加了讽喻的元素,但main idea 不是原创。就好比有才网友的
“东北人都是活雷锋之xx版”。
还是不错的,很值得一看。踩它,余心不忍。
原创最可贵。
是真正大材呀。周星驰也加了讽喻的元素,但main idea 不是原创。就好比有才网友的
“东北人都是活雷锋之xx版”。
还是不错的,很值得一看。踩它,余心不忍。
原创最可贵。
g*a
58 楼
n*0
78 楼
楼主没看懂,打回去重看。
相关阅读
哪个数据可靠点?一直说there is no su binary installedAndroid App: Next Launcher 3Dandroid最好的mp3播放器是什么?有用PPTV的吗?HTC ONE怎么不出平板给侄女选个手机作礼物对HTC one不满的地方志玲机的电池表现图:轻度使用三星Galaxy S III Mini怎么样?用win phone的定力很强大三爽最新行艺。htc $100 rebate收到了samsung ativ s VS htc oneFreedomPop Will offer Free Smartphones PlanNookHD+在Hybrid下想刷emmc,但没法启动到SD卡HTC的电池touchpad怎么卸载android啊其实windows8 metro多显示器下狠不错,比mac强AT&T 的HTC ONE 如何root啊?