QUESTION: 把(2, 3, 5, 7)称为primes,能被primes整除的我们称之为Walprimes,比如 -21, -30, 0, 5, 14 是, 而-121, 1, 143 etc不是Walprimes.现在给一个由数字组成的字符串,请在数字之间用+,或-,或什么符号都不用,来组成一个表达式.判断有多少个表达式的值是Walprimes. SOLUTION: 首先,使用Inclusion–exclusion principle.F(s,{2, 3, 5, 7}) 表示从字符串s…
A Poor King Tag: Reversed BFS Preprocessing is needed to calculate answers for all positions (states). Beginning with all checkmate states, you should do reversed Breath-First Search (BFS) to update values. The state can be specified by three positio…
链接:http://www.bnuoj.com/bnuoj/problem_show.php?pid=25585 Current Server Time: 2013-08-27 20:42:26 Robots on a grid Time Limit: 3000ms Memory Limit: 65536KB   64-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Disc…
I am Nexus Master!  The 13th Zhejiang University Programming Contest 参见:http://www.bnuoj.com/bnuoj/problem_show.php?pid=29137 题意就理解错了!!! 之后乱搞就也错了!!! Current Server Time: 2013-08-30 23:29:55 I am Nexus Master! Time Limit: 2000ms Memory Limit: 65536KB…
找规律水题... Traveling Cellsperson Time Limit: 1000ms Memory Limit: 65535KB This problem will be judged on UESTC. Original ID: 185264-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:  …
状压DP... Kings on a Chessboard Time Limit: 10000ms Memory Limit: 65535KB This problem will be judged on UESTC. Original ID: 185164-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:  …
Query on a tree Time Limit: 5000ms Memory Limit: 262144KB   This problem will be judged on SPOJ. Original ID: QTREE64-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:   None Graph…
Cellphone Typing Time Limit: 5000ms Memory Limit: 131072KB   This problem will be judged on UVA. Original ID: 1252664-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:   None Graph…
The Hundred Greatest Theorems The millenium seemed to spur a lot of people to compile "Top 100" or "Best 100" lists of many things, including movies (by the American Film Institute) and books (by the Modern Library). Mathematicians wer…
题目链接:http://www.bnuoj.com/bnuoj/problem_show.php? pid=17121 2014-04-25 22:59:49 不和谐的长难句1 Time Limit: 8000ms Case Time Limit: 2000ms Memory Limit: 65536KB 64-bit integer IO format: %lld      Java class name: Main pid=17120" class="ui-button ui-wi…