既然这题这么水,我就不写了……挖掘栅栏的本质:只能建在相邻两个,且建好后使得狼和羊之间不存在通路。而割的定义是:使S集和T集不存在通路。而题目又要求建的栅栏最少,于是就是最小割问题了。从源点向所有狼连一条∞的边,从所有羊向汇点连一条∞的边,这样就能保证狼和羊都在不同的点集里。然后再从狼到相邻的羊和空...
分类:
其他好文 时间:
2014-06-30 13:34:26
阅读次数:
224
Write something like this to automatically mount system drive:/dev/sda1 /media/win-c ntfs-3gauto,rw,suid,exec,async,users,locale=zh_CN.UTF-8 0 0...
分类:
其他好文 时间:
2014-06-30 13:30:17
阅读次数:
276
Gnome 3 does not have good support for multiple screen display. It is therefore necessary to use xrandr for such purpose. It can be used as follows.Di...
分类:
其他好文 时间:
2014-06-30 13:22:02
阅读次数:
268
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-06-30 13:21:00
阅读次数:
202
The following packages should be installed:scimscim-tables-zh (this includes Wubi input method)scim-tables-pinyin (this includes Pinyin input method)s...
分类:
系统相关 时间:
2014-06-30 13:18:56
阅读次数:
450
假设仅仅使用PlaySound()这个API函数来表现声音效果的话,那么就无法表现出声音的混音效果,由于PlaySound在播放还有一个声音时,必定会导致现有声音的停止。因此,使用PlaySound()要想构建出一个包括丰富音乐与音效的游戏世界是不现实的。 而DirectSound就能够完美的解决....
分类:
其他好文 时间:
2014-06-30 13:16:53
阅读次数:
288
IOS中的动画有两大类1.UIView的视图动画2.Layer的动画 UIView的动画也是基于Layer的动画动画的代码格式都很固定1.UIView动画一般方式[UIView beginAnimations:@"ddd" context:nil];//设置动画[UIView commitAnima...
分类:
其他好文 时间:
2014-06-30 13:13:47
阅读次数:
184
username:Juzhaofeng授权码:MPZRP-Y7LWW-K1DKG-FM92E-2C5F5-ZEKFF
Recently, I needed to call a CUI program from within Qt GUI window and simulate the effect of an embedded command line window like the Autolisp consol...
分类:
其他好文 时间:
2014-06-30 12:45:02
阅读次数:
1252
From gtk+-2.10.2 configure --help we can see (I just only view the 2.10.2, not know other 2.10.x):--with-gdktarget=[x11/linux-fb/win32/quartz/directfb...
分类:
系统相关 时间:
2014-06-29 18:48:27
阅读次数:
430