s*f
2 楼
There are a row of houses, each house can be painted with three colors red,
blue and green. The cost of painting each house with a certain color is
different. You have to paint all the houses such that no two adjacent houses
have the same color. You have to paint the houses with minimum cost. How
would you do it?
blue and green. The cost of painting each house with a certain color is
different. You have to paint all the houses such that no two adjacent houses
have the same color. You have to paint the houses with minimum cost. How
would you do it?
Y*d
3 楼
用vpn上网,网站完全不知道真实ip?
r*g
4 楼
一排房子,难道不是两种最便宜的颜色轮流漆……?
k*s
5 楼
看你干什么。如果是想保留一点个人小隐私,VPN是有用的。如果是做大案,没用,因
为FBI可以查看任何一个VPN的记录找到你的IP甚至更多的资料。
为FBI可以查看任何一个VPN的记录找到你的IP甚至更多的资料。
o*g
6 楼
假设前面N个已经刷好了,第N+1个,不能和第N个同颜色,就剩俩颜色了,选便宜的那个
第一个就三个里面选最便宜的。
,
houses
【在 s***f 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: There are a row of houses, each house can be painted with three colors red,
: blue and green. The cost of painting each house with a certain color is
: different. You have to paint all the houses such that no two adjacent houses
: have the same color. You have to paint the houses with minimum cost. How
: would you do it?
第一个就三个里面选最便宜的。
,
houses
【在 s***f 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: There are a row of houses, each house can be painted with three colors red,
: blue and green. The cost of painting each house with a certain color is
: different. You have to paint all the houses such that no two adjacent houses
: have the same color. You have to paint the houses with minimum cost. How
: would you do it?
g*e
8 楼
minCost(first i houses, i th house with color x)
,
houses
【在 s***f 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: There are a row of houses, each house can be painted with three colors red,
: blue and green. The cost of painting each house with a certain color is
: different. You have to paint all the houses such that no two adjacent houses
: have the same color. You have to paint the houses with minimum cost. How
: would you do it?
,
houses
【在 s***f 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: There are a row of houses, each house can be painted with three colors red,
: blue and green. The cost of painting each house with a certain color is
: different. You have to paint all the houses such that no two adjacent houses
: have the same color. You have to paint the houses with minimum cost. How
: would you do it?
k*s
9 楼
各个国家的法律不同。
你就记住一条:一切加密都是到VPN服务器为止,到那都是解开的。当然,如果你访问
的最终目的地是SSL(HTTPS),那么那一层的加密还是维持的。
你就记住一条:一切加密都是到VPN服务器为止,到那都是解开的。当然,如果你访问
的最终目的地是SSL(HTTPS),那么那一层的加密还是维持的。
R*9
11 楼
use a 3*N matrix.
fun('R', i) = cost('R', i) + min(fun('B', i-1), fun('G', i-1));
fun('G', i) = cost('G',i) + min(fun('R', i-1), fun('B', i-1));
fun('B', i) = cost('B', i) + min(fun('R',i-1), fun('G', i-1));
【在 o***g 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 这个还真有问题,比如
: R G B
: 1 10 100 1000
: 2 1 1000 10000
: 第一个选了10,第二个就得选1000,结果是1010
: 其实答案应该是第一个选100,第二个选1,结果是101
:
: 那个
fun('R', i) = cost('R', i) + min(fun('B', i-1), fun('G', i-1));
fun('G', i) = cost('G',i) + min(fun('R', i-1), fun('B', i-1));
fun('B', i) = cost('B', i) + min(fun('R',i-1), fun('G', i-1));
【在 o***g 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 这个还真有问题,比如
: R G B
: 1 10 100 1000
: 2 1 1000 10000
: 第一个选了10,第二个就得选1000,结果是1010
: 其实答案应该是第一个选100,第二个选1,结果是101
:
: 那个
相关阅读
How to share folders in OneDrive from Windows 10现在有双屏的手机了么ZUK Z1貌似比1+2牛,为啥没人讨论?$179的moto g (3rd) 还是$169的fire phone好?能防止CHROME关闭的(最小化到任务栏)的插件zuk小米盒子的youku怎么又有很多视频不能看了吐槽一下用skype to go播电话时对方的振铃音4G不远了吧 (转载)kodi遥控器控制目前kindle对中文txt的支持还是有点问题kodi闪退步软软后尘,狗也沦陷,要爱惜果子和小扎。砖家预测:中崩或引发果崩1+升级到棒棒糖之后,怎么继续升级省电?自拍杆求推荐这周win10发布sr1?galaxy S3充电很慢怎么办?大家有没有发现t-mobile的程控交换机很落后kindel现在还可以装多看吗?