Description
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent til...
分类:
其他好文 时间:
2015-08-15 20:07:33
阅读次数:
111
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5389大体题意是:有两个门A和B,还有一群人,每个人都有一个数字,疯了一样的T。。比赛的时候十连T也是醉醉的。 这道题感觉像DP,但是不知道从何下手,看别人敲出来才知道怎么去用。在比赛过程中还有一个问题....
分类:
其他好文 时间:
2015-08-15 17:54:34
阅读次数:
107
//给组数,将其分为两组,使得左边的所有的数的和mod9为a,右边为b
//问方法数
//01背包,dp[i][j] ,前i个数得到的mod9为j的个数
//dp[i][j] = (dp[i-1][(j+9-tmp)%9] + dp[i-1][j])%mod ;
#include
#include
#include
using namespace...
分类:
其他好文 时间:
2015-08-15 14:58:20
阅读次数:
133
HDU 5389 Zero Escape (类0/1背包)...
分类:
其他好文 时间:
2015-08-15 12:01:10
阅读次数:
119
Zero Escape
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 864 Accepted Submission(s): 438
Problem Description
Zero Escape, i...
分类:
编程语言 时间:
2015-08-15 10:27:27
阅读次数:
185
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5389
题意:定义数根:①把每一位上的数字加起来得到一个新的数,②重复①直到得到的数只有1位。给定n,A,B和n个一位数,求把这n个数分成两部分,使得这两部分的其中一部分的和的数根等于A另外一部分的和的数根等于B的方案数。
分析:一个数a的数根s=(a-1)%9+1,为了方便直接用s=a%9,其中0代表...
分类:
其他好文 时间:
2015-08-15 00:17:27
阅读次数:
147
一个数的数字根只和它mod~9mod 9之后的值有关,只要类似背包就能完成人员分配的计算。
具体证明:数字根=\sum_{i=0}^{w}a_i∑?i=0?w??a?i??,数字=\sum_{i=0}^{w}10^i*a_i∑?i=0?w??10?i???a?i??
数字-数字根=\sum_{i=0}^{w}(10^i-1)*a_i∑?i=0?w??(10?i???1)?a?i??,这...
分类:
其他好文 时间:
2015-08-14 19:18:24
阅读次数:
293
Problem Description
Zero Escape, is a visual novel adventure video game directed by Kotaro Uchikoshi (you may hear about ever17?) and developed by Chunsoft.
Stilwell is enjoying the first chapte...
分类:
其他好文 时间:
2015-08-14 19:04:53
阅读次数:
97
参考http://www.php100.com/manual/PostgreSQL8/functions-matching.htmlLIKEstring LIKE pattern [ ESCAPE escape-character ]string NOT LIKE pattern [ ESCAPE ...
分类:
数据库 时间:
2015-08-14 18:35:19
阅读次数:
1077