码迷,mamicode.com
首页 >  
搜索关键字:pleasant sheep and b    ( 103个结果
别上“绵羊墙”多丢脸啊!
2002年美国第十界黑客大会上,一群参加的黑客偶然坐到一起,将一些在大会现场上网,但却在使用不安全口令的人的用户名和密码写在餐厅的纸盘子上,并将这些纸盘子贴在墙上,还在墙上写了个大大的“Sheep”。黑客们这样做,一方面是想教育人民“你很可能随时都被监视”,另一方面也是想给那些参会的人难堪:能来参加...
分类:其他好文   时间:2014-09-25 19:16:47    阅读次数:267
hdoj 3046 Pleasant sheep and big big wolf 【入门最小割】
题目:hdoj 3046 Pleasant sheep and big big wolf 题意:一个矩阵,1表示羊,2表示狼,然后让把羊和狼隔开,问需要最小的栅栏、 分析:标准的最小割 最小割:一个图中,删去容量最小的边使得从 s 到 t 没有路径。 最小割 = 最大流 建图: 首先编号 相邻点建边 1  s 到 羊 无穷 t 到 狼 无穷 (这个题目数据比较水...
分类:其他好文   时间:2014-08-25 21:16:54    阅读次数:359
HDU 3911 Black And White 分段树 题解
Problem DescriptionThere are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color o...
分类:其他好文   时间:2014-08-20 12:11:22    阅读次数:209
ACM HDU-2952 Counting Sheep A while ago I had trouble sleeping
Counting SheepTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2060Accepted Submission(s): 1359 Pr...
分类:其他好文   时间:2014-08-16 12:30:40    阅读次数:334
CodeForces - 61E Enemy is weak
Description The Romans have attacked again. This time they are much more than the Persians but Shapur is ready to defeat them. He says: "A lion is never afraid of a hundred sheep". Nevertheless ...
分类:其他好文   时间:2014-08-07 13:14:40    阅读次数:269
HDUJ 2952 Counting Sheep 搜索
Counting Sheep Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2039    Accepted Submission(s): 1342 Problem Description A while ago I ...
分类:其他好文   时间:2014-07-28 00:29:19    阅读次数:276
Dp_F Pku1157
/* F - 简单dp Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Description You want to arrange the window of your flower shop in a most pleasant way. You have...
分类:其他好文   时间:2014-07-18 21:31:53    阅读次数:277
HDU 3046Pleasant sheep and big big wolf(网络流之最小割)
题目地址:HDU 3046 最小割第一发!其实也没什么发不发的。。。最小割==最大流。。 入门题,但是第一次入手最小割连入门题都完全没思路。。。sad。。对最小割的本质还是了解的不太清楚。。 这题就是对每两个相邻的格子的边界都要进行加边,然后求最大流就OK了。 RE了好长时间,注意遍历加边的时候要从1开始,而不是0开始,因为0是源点的。。。(也许只有我才犯这种错误吧。。。)建图不多说了。。...
分类:其他好文   时间:2014-07-18 21:31:05    阅读次数:235
Pleasant sheep and big big wolf
点击打开链接 题目:在一个N * M 的矩阵草原上,分布着羊和狼,每个格子只能存在0或1只动物。现在要用栅栏将所有的狼和羊分开,问怎么放,栅栏数放的最少,求出个数? 解析:将狼群看作一个集合,羊群看作一个集合。然后设置源点和汇点,将两点至存在动物的点的距离赋值为1,构图,由于求得是栅栏数,从存在动物的位置向四周发散点赋值为1,即该方向放置一个栅栏。然后可以发现变成了求最小割,即求出最大流。...
分类:其他好文   时间:2014-07-18 15:10:40    阅读次数:302
HDU-4819-Mosaic(二维线段树)
Problem Description The God of sheep decides to pixelate some pictures (i.e., change them into pictures with mosaic). Here's how he is gonna make it: for each picture, he divides the picture into n x...
分类:其他好文   时间:2014-07-09 12:14:13    阅读次数:433
103条   上一页 1 ... 8 9 10 11 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!