摘要: $Description:$ 题面类似n皇后,不过摆的是国王 $Sample$ $Input:$ 3 2 $Sample$ $Output:$ 16 $Solition:$ 设计状态,这种题我还是没有思路啊,怎么办啊啊啊啊啊? 看了看题解: 设计 $f[i][j][k]$ 表示前 $i$ 行,该行状 阅读全文
posted @ 2019-04-15 20:42 章鱼那个哥 阅读(122) 评论(0) 推荐(0)
摘要: $Description:$ 给出两个数a,b,求出$[a,b]$中各位数字之和能整除原数的数的个数。 $Sample $ $Input:$ 10 19 $Sample$ $Output:$ 3 $Solution:$ 设计状态 $f[len][sum][res]$ 表示倒数还有 $i$ 位要做,当 阅读全文
posted @ 2019-04-15 18:00 章鱼那个哥 阅读(156) 评论(0) 推荐(0)
摘要: $Description: $ 给定两个正整数a和b,求在[a,b]中的所有整数中,每个数码(digit)各出现了多少次。 $Sample$ $Input:$ 1 99 $Sample$ $Output:$ 9 20 20 20 20 20 20 20 20 20 $Solution:$ 状态 $f 阅读全文
posted @ 2019-04-15 15:38 章鱼那个哥 阅读(189) 评论(0) 推荐(0)
摘要: $Description:$ 给出a,b,求$[a,b]$区间满足相邻两位之间差大于等于2的数的个数 $Sample$ $Input:$ 1 10 $Sample$ $Output$ 9 $Sample$ $Intput:$ 25 50 $Sample$ $Output:$ 20 $Solution 阅读全文
posted @ 2019-04-15 10:08 章鱼那个哥 阅读(161) 评论(0) 推荐(0)