BZOJ1991 : Pku2422 The Wolves and the Sheep】的更多相关文章

将每个不是障碍的格子标号,设三只狼的位置分别为$A,B,C$,羊的位置在$D$.合法状态中强行限制$A<B<C$,这样状态数只有$\frac{n^8}{6}\approx 1.6\times 10^7$. 设$f[S],g[S]$表示目前局面是$S$,狼/羊正在决策,最优情况下羊会不会被围住. 若$f[S]$的某个后继$g[T]$是真,那么$f[S]$也是真. 若$g[S]$的所有后继$f[T]$都是真,那么$g[S]$也是真. 先认为所有$f[S]$和$g[S]$都是假,并记录每个$g[S]…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
A. Protect Sheep time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided…
http://codeforces.com/contest/948/problem/A   A. Protect Sheep Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepherd dogs in such a way that all his she…
Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepherd dogs in such a way that all his sheep are protected. The pasture is a rectangle consisting of R × …
  After a long night of coding, Charles Pearson Peterson is having trouble sleeping. This is not only because he is still thinking about the problem he is working on but also due to drinking too much java during the wee hours. This happens frequently…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3046 In ZJNU, there is a well-known prairie. And it attracts pleasant sheep and his companions to have a holiday. Big big wolf and his families know about this, and quietly hid in the big lawn. As ZJNU A…
[题目链接:HDOJ-2952] Counting Sheep Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2476    Accepted Submission(s): 1621 Problem Description A while ago I had trouble sleeping. I used to lie awake,…
Counting sheep... Description: Consider an array of sheep where some sheep may be missing from their place. We need a function that counts the number of sheep present in the array (true means present). For example, [true, true, true, false, true, tru…
Counting Sheep Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 14   Accepted Submission(s) : 12 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description A while ago I had trou…