当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5611:Baby Ming and phone number

题目描述
Baby Ming collected lots of cell phone numbers, and he wants to sell them for money.

He thinks normal number can be sold for $b$ yuan, while number with following features can be sold for $a$ yuan.

1.The last five numbers are the same. (such as 123-4567-7777)

2.The last five numbers are successive increasing or decreasing, and the diffidence between two adjacent digits is $1$. (such as 188-0002-3456)

3.The last eight numbers are a date number, the date of which is between Jar 1st, 1980 and Dec 31th, 2016. (such as 188-1888-0809,means August ninth,1888)

Baby Ming wants to know how much he can earn if he sells all the numbers.
输入解释
In the first line contains a single positive integer $T$, indicating number of test case.

In the second line there is a positive integer $n$, which means how many numbers Baby Ming has.(no two same phone number)

In the third line there are $2$ positive integers $a, b$, which means two kinds of phone number can sell $a$ yuan and $b$ yuan.

In the next $n$ lines there are $n$ cell phone numbers.(|phone number|==11, the first number can’t be 0)

$1 \leq T \leq 30, b < 1000, 0 < a, n \leq 100,000$
输出解释
How much Baby Nero can earn.
输入样例
1
5
100000 1000
12319990212
11111111111
22222223456
10022221111
32165491212
输出样例
302000
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5611

最后修改于 2020-10-25T23:24:11+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000/1500MS(Java/Others) 65536/65536K(Java/Others)