数位Dp
Last0rder
最后之作
展开
-
poj3252Round Numbers非递归数位dp解
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9894 Accepted: 3569 Description The cows, as you know, have no fingers or thumbs and thus are unable to play Scissor原创 2015-04-22 22:50:15 · 830 阅读 · 0 评论 -
hdu4352XHXJ's LIS
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1126 Accepted Submission(s): 446 Problem Description #define xhxj (Xin Hang senior si原创 2015-04-24 20:23:44 · 905 阅读 · 0 评论 -
CF 55D Beautiful numbers
D. Beautiful numbers time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Volodya is an odd boy and his taste is strange a原创 2015-04-24 21:22:38 · 786 阅读 · 0 评论 -
hdu4734F(x)
F(x) Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2188 Accepted Submission(s): 827 Problem Description For a decimal number x with原创 2015-04-24 22:27:22 · 770 阅读 · 0 评论 -
uestc250windy数
windy数 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) windy定义了一种windy数。 不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共有多少个windy数?原创 2015-04-21 21:40:06 · 761 阅读 · 0 评论 -
hdu5456 Matches Puzzle Game
题意:给出n个火柴棒,问能摆成多少个a-b=c的等式,其中,a,b,c均为正整数。 做法:dp[i][j][cr][b][c],当前用了i个火柴棒,从低位到高位,已经考虑到了第j位,cr代表j-1位是否给j位贡献了一个1,b代表数字b是否已经到了最高位,c代表数字c是否已经到了最高位。不断枚举在j位的数字进行数位dp即可。由于j肯定是不断在增大的,所以写的时候可以直接舍去这维。 #includ原创 2015-09-23 12:06:09 · 991 阅读 · 1 评论