B. 停车场收费

    Type: Default 1000ms 256MiB

停车场收费

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.

题目描述

Csvoner 停了一辆特斯拉在路边停车场,停车场只在“周一至周五的 08:00 ~ 21:00” 收费,收费标准为高峰时间段(17:00 ~ 19:00)每小时 xx 元,非高峰时间(除了高峰时间的其他收费时间)每小时 yy 元。

现在已知停车场开张的第 11 天为星期一,Csvoner 的停车时间为第 ll 天的 ss 点整到第 rr 天的 ee 点整。

求 Csvoner 需要支付多少钱的停车费。

输入格式

一行六个整数 x,y,l,s,r,ex,y,l,s,r,e

输出格式

一行一个整数,表示 Csvoner 需要付出的停车费。

3 2 5 10 8 18
45

样例解释

以下为所有收费情况

天数 时间 收费
5 10:00~17:00 7 小时共 7×2=147\times 2 = 14
17:00~19:00 2 小时共 2×3=62\times 3 = 6
19:00~21:00 2 小时共 2×2=42\times 2 = 4
6 ~ 周六免费
7 周日免费
8 08:00~17:00 9 小时共 9×2=189\times 2 = 18
17:00~18:00 1 小时共 1×3=31\times 3 = 3

总计花费:14+6+4+18+3=4514+6+4+18+3=45 元。

数据规模与约定

对于 100%100\% 的数据,1x,y101 \le x,y\le 101lr10121\le l\le r\le 10^{12}1s,e231\le s,e\le 23。保证如果 l=rl=rses\le e

  • 子任务 1(30 分):保证 l=r106l=r\le 10^6
  • 子任务 1(30 分):保证 s=8s=8e=21e=21
  • 子任务 2(40 分):没有特殊限制

西中经开联校 - 第 8 场周赛

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2025-3-5 16:00
End at
2025-3-5 18:00
Duration
2 hour(s)
Host
Partic.
30