你这题目是不是缺了一块
查看原帖
你这题目是不是缺了一块
761125
Milthm楼主2023/1/19 12:13

看着看着感觉不对劲,回到原OJ一看发现少了:

So he decided to rob as many banks as he can from Linearland. Linearland consists of N cities on a 1-Dimensional plane which Aiden can visit, after he’s teleported to some city of Linearland he can begin robbing banks, each city i has a bank that contains G[i] dollars.

The teleportation device is also expensive to use; inn order to teleport to some city i he has to pay T[i] dollars but teleportation isn’t his only means of transport he can also visit cities by helicopter which costs W dollars per meter. Aidens initial position is outside Linearland, so, the first city he visits can only be reached by teleportaion.

Each city i is situated in position X[i] (which means it’s X[i] meters far from the beginning of Linearland). Aiden isn’t sure that robbing Linearland banks is profitable so he asked you to calculate the maximum amount of money he can earn.

(Aiden can have a negative amount of money at any time).

Please note that Aiden doesn't need to use all K teleports, and since he is very greedy he will never go to Linearland if his net profit is negative (i.e if he can't get a positive profit he will settle with a good old 0)


这块好像应该加在题目描述里面(加在已有的后面)

2023/1/19 12:13
加载中...