数位DP
文章平均质量分 67
NOIAu
最后一天啦~
展开
-
hdu 4734 F(x) 数位DP裸
DescriptionFor 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 you are given two numbers A and B, plea原创 2017-10-02 21:53:41 · 417 阅读 · 0 评论 -
BZOJ 1026: [SCOI2009]windy数 数位DP
Time Limit: 1 Sec Memory Limit: 162 MB Submit: 8370 Solved: 3770Description windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A和B之间,包括A和B,总共有多少个windy数?Input 包含两个整数,A B。Output 一个整数Samp原创 2017-09-29 22:20:51 · 319 阅读 · 0 评论 -
HDU 2089 不要62
杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914 都属于不吉利号码。但是,61152虽然含有6和2,但不是62连号,所以不属于不吉利原创 2017-10-02 15:18:35 · 777 阅读 · 0 评论 -
PoJ 3252 Round Numbers 数位DP
DescriptionThe 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 ord原创 2017-10-02 22:14:38 · 563 阅读 · 0 评论 -
hdu 3709 Balanced Number 数位DP
DescriptionA 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原创 2017-10-02 22:25:36 · 670 阅读 · 0 评论