202312NHOI 第一题 购物(0.6)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
快到春节了,小慧的妈妈在京东网站购买年货,她共购买了n种年货,每种年货的单价为ai元,她购买了bi件,如果购买的总价超过s元(含s元)就不用运费,否则就要付运费x元,小慧的妈妈希望小慧算算共需要付费多少元?
输入格式
第一行输入n,s,x。
接下来n行,每行2个整数ai,bi。
输出格式
输出需付费多少元。
输入/输出例子1
输入:
2 2000 50
1000 1
100 6
输出:
1650
样例解释
【数据范围】
对于80%的数据,1<=n<=10^3,1<=ai,bi<=10^3,1<=s,x<=10^5;
对于100%的数据,1<=n<=2*10^5,1<=ai,bi<=10^4,1<=s,x<=10^6。
来源
计算2023年区赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 5
- Start at
- 2025-12-30 13:30
- End at
- 2026-1-7 21:30
- Duration
- 200 hour(s)
- Host
- Partic.
- 34