
数位dp
永夜莫明
菜是原罪
展开
-
Mountain Number(数位dp)
https://cn.vjudge.net/problem/FZU-2109One integer number x is called "Mountain Number" if:(1) x>0 and x is an integer;(2) Assume x=a[0]a[1]...a[len-2]a[len-1](0≤a[i]≤9, a[0] is positive). Any...原创 2019-08-17 22:48:14 · 336 阅读 · 0 评论 -
吉哥系列故事——恨7不成妻 (数位dp)
https://cn.vjudge.net/contest/312854#problem/E单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节,不管是214还是77,他都讨厌! 吉哥观察了214和77这两个数,发现: 2+1+4=7 7+7=7*2 77=7*11 最终,他发现原来这一切归根到底都是...原创 2019-08-14 21:34:39 · 422 阅读 · 0 评论 -
Balanced Numbers (数位dp+3进制状压)
https://cn.vjudge.net/contest/312854#problem/HBalanced numbers have been used by mathematicians for centuries. A positive integer is considered a balanced number if:1) Everyevendigit appear...原创 2019-08-13 22:34:23 · 167 阅读 · 0 评论 -
Balanced Number (数位dp)
A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight indicated by the digit. When a pivot is ...原创 2019-08-13 10:38:26 · 286 阅读 · 0 评论 -
Classy Numbers (数位dp)
https://cn.vjudge.net/contest/312853#problem/GLet's call some positive integerclassyif its decimal representation contains no more than33non-zero digits. For example, numbers44,200000200000,1...原创 2019-08-12 20:06:02 · 291 阅读 · 0 评论 -
Beautiful numbers (数位dp)
Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number isbeautifulif and only if it is divisible by each of its nonzero digits. We will not argue w...原创 2019-08-12 19:40:40 · 255 阅读 · 0 评论 -
Round Numbers (数位dp)
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) in order to make...原创 2019-08-11 23:51:40 · 169 阅读 · 0 评论 -
【zoj3962】Seven Segment Display(数位dp)
题目链接:https://cn.vjudge.net/problem/ZOJ-3962 A seven segment display, or seven segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to the ...原创 2019-02-21 22:35:11 · 165 阅读 · 0 评论 -
X mod f(x) (数位DP)
题目链接:https://cn.vjudge.net/problem/HDU-4389Here is a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } Now, you want to know, in a gi...原创 2019-02-19 21:29:08 · 409 阅读 · 0 评论 -
F(x) (数位DP)(减法的运用)
题目链接:https://cn.vjudge.net/problem/HDU-4734For a decimal number x with n digits (A nA n-1A n-2 ... A 2A 1), we define its weight as F(x) = A n * 2 n-1 + A n-1 * 2 n-2 + ... + A 2 * 2 + A 1 * 1. Now ...原创 2019-02-19 20:43:53 · 231 阅读 · 0 评论 -
Bomb (数位dp)
The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence ...原创 2019-01-21 16:46:25 · 295 阅读 · 0 评论 -
不要62 (数位dp入门)
题目链接:https://cn.vjudge.net/problem/HDU-2089杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914 ...原创 2019-01-21 16:01:08 · 221 阅读 · 0 评论