数位dp
xiaoyu1_1
学生
展开
-
hdu-4734-F(x)--数位dp
参考:http://www.cnblogs.com/kuangbin/p/3321997.html 题:http://acm.hdu.edu.cn/showproblem.php?pid=4734 #include #include int p[20][10000]; int bit[20]; int dfs(int pos,int num,int flag) { if(pos==-1)原创 2013-12-03 00:48:59 · 524 阅读 · 0 评论 -
FZU 2109 Mountain Number ---数位dp
http://www.cnblogs.com/woaishizhan/archive/2013/05/10/3070391.html #include #include #include #include using namespace std; #define inf 0x3f3f3f3f int bit[20],dp[20][20][2]; int dfs(int pos,int转载 2014-02-20 13:36:09 · 575 阅读 · 0 评论 -
I. Counting 第八届北京邮电大学程序设计竞赛 - 热身赛 (1)
时间限制 1000 ms 内存限制 65536 KB 题目描述 In a math class,you are assigned the following task. First,look at the definition F(n,d)=k which means that in the given number n,there are k d's. For insta原创 2014-03-08 11:14:35 · 820 阅读 · 0 评论 -
D. Nass Number 第八届北京邮电大学程序设计竞赛 - 热身赛 (2)
时间限制 1000 ms 内存限制 65536 KB 题目描述 We define two functions under base 10. f(x) indicates the number which is formed by operating bitwise exclusive or(xor) with each digit of x, and g(x) indic原创 2014-03-13 11:01:31 · 1110 阅读 · 0 评论