随笔分类 - 数位dp
摘要:odd-even number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 454 Accepted Submission(s): 245 P
阅读全文
摘要:K-wolf Number Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 737 Accepted Submission(s): 265 Pro
阅读全文
摘要:简单的数位dp题,题意是求区间内的一种数的个数,这种数的本身和各个位置上的数之和能除尽给定的k(k <= 10000)。 dp[20][10000][100]也是可以过的,但是因为各位置上的数之和不会超过100。所以k>=100的情况其实可以直接返回0。 所以dp[20][110][110]足够了(
阅读全文
摘要:X mod f(x) Problem Description Here is a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } Now, you want to kno
阅读全文
摘要:How Many O's? 题意是求区间内数字中0的个数,比如100就有两个0。 数位dp吧,dp[i][j][k], i很明显表示当前位置,j表示找到的0的个数,k表示要找的0的个数。因为数字里0的个数最多32个,所以可以枚举32种k的情况,用数位dp去找。
阅读全文
摘要:F(x) Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3692 Accepted Submission(s): 1377 Problem Des
阅读全文
摘要:Balanced Number Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 3988 Accepted Submission(s): 186
阅读全文
摘要:Round Numbers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11681 Accepted: 4392 Description The cows, as you know, have no fingers or th
阅读全文
摘要:BALNUM - Balanced Numbers no tags no tags 题目链接 Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a bal
阅读全文
摘要:Beautiful numbers 题目链接 Beautiful numbers 题目链接 Description Volodya is an odd boy and his taste is strange as well. It seems to him that a positive inte
阅读全文
摘要:不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 32358 Accepted Submission(s): 11514 题目链接 Pro
阅读全文

浙公网安备 33010602011771号