目录 A 低买高卖 C 接水问题 D做任务一 E做任务三 51nod一个贪心专题,大多数都是见过的套路,做题找找感觉,有些题解思路懒得写了,直接贴毕姥爷的直播题解了 A 低买高卖 考虑股票市场,一共有n天.对于第i天,B君知道股票的价格是每单位a[i]元在每一天,B君可以选择买入一个单位的股票,卖出一个单位的股票,或者什么都不做. 刚开始B君有无穷多的钱,但是没有任何股票.问n天之后B君最多可以赚多少钱.(1 <= n <= 200000)(1 <= a[i] <= 10000)…
Dinner 时间限制:100 ms | 内存限制:65535 KB 难度:1 描述 Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife and other tableware is not enough in the kitchen, Litt…
Color the fence 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 Tom has fallen in love with Mary. Now Tom wants to show his love and write a number on the fence opposite to Mary’s house. Tom thinks that the larger the numbers is, the more chance to win Mary…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 62898 Accepted Submission(s): 21231 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats gu…
A Magic Lamp Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2937 Accepted Submission(s): 1145 Problem Description Kiki likes traveling. One day she finds a magic lamp, unfortunately the gen…
独木舟上的荡漾 Time Limit:1000MS Memory Limit:65536K Total Submit:76 Accepted:44 Description 进行一次独木舟的旅行活动,独木舟可以在港口租到,并且之间没有区别.一条独木舟最多只能乘坐两个人,且乘客的总重量不能超过独木舟的最大承载量.我们要尽量减少这次活动中的花销,所以要找出可以安置所有旅客的最少的独木舟条数.现在请写一个程序,读入独木舟的最大承载量.旅客数目和每位旅客的重量.根据给出的规则,计算要安置所有旅客必须的最…