上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页
摘要: 题目链接 题意 两人赛马,每居获胜得200,平局无事发生,输了也输200。求最优的策略使赢的钱最多。 分析 排序,从最快的开始比,若比不过,则用最弱的消耗最强的。模拟即可。 阅读全文
posted @ 2018-04-23 15:41 litos 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Dhinwaji is an acclaimed poet and likes to play with words and letters. He has bought some stickers where each sticker has a lower case english l 阅读全文
posted @ 2018-04-23 13:37 litos 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 题目链接 AMRExchange is the latest cryptocurrency exchange that has become very popular among cryptocurrency traders. On AMRExchange, there are N cryptocu 阅读全文
posted @ 2018-04-23 12:08 litos 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意 工程师要安装n个服务,其中服务Ji需要si单位的安装时间,截止时间为di。超时会有惩罚值,若实际完成时间为ci,则惩罚值为max{0,ci-di}。从0时刻开始执行任务,问惩罚值最大的两个服务的惩罚值之和的最小是多少? 分析 乍一看似乎要二分,但实际上并不是。贪心来做,按di从小到大 阅读全文
posted @ 2018-04-23 01:42 litos 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意 机场有两种飞机,每小时一些飞机到达,每小时安排一架飞机起航。求任意时刻中两种飞机数目的最大值的最小值。 分析 首先肯定是二分来做。这里的难点在于如何判断飞机数目是否合法。一开始忽略了某时刻会有某种飞机并不能起飞的情况,所以不能简单粗暴地只算总数。应该同时记录两种飞机的在每个时刻的可起 阅读全文
posted @ 2018-04-23 00:48 litos 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意 在n*n的棋盘上的n个指定区间上各放1个'车’ , 使他们相互不攻击(不在同行或同列),输出一种可能的方法。 分析 每行每列都必须放车,把行列分开看,若行和列同时有解,则问题有解。这样就变成了n个区间选n个点的贪心问题。对每个点x选择包含它的最优未使用的区间,这个最优区间就是右界最小 阅读全文
posted @ 2018-04-21 10:45 litos 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意 有n个任务,每个任务有三个参数ri,di和wi,表示必须在时刻[ri,di]之内执行,工作量为wi。处理器执行速度可以变化,当执行速度为s时,工作量为wi。处理器的速度可以变化,当执行速度为s时,一个工作量为wi的任务需要执行wi/s个单位时间。任务不一定连续执行,可以分成若干块。求 阅读全文
posted @ 2018-04-21 00:50 litos 阅读(155) 评论(0) 推荐(0) 编辑
摘要: n sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is installed at the horizontal center line o 阅读全文
posted @ 2018-04-19 23:02 litos 阅读(245) 评论(0) 推荐(0) 编辑
摘要: "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There wil 阅读全文
posted @ 2018-04-16 21:55 litos 阅读(135) 评论(0) 推荐(0) 编辑
摘要: It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, 阅读全文
posted @ 2018-04-16 20:40 litos 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页