上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 87 下一页
摘要: 贪心练习 题目大意: 给定长度为 $len$ 的字符串 $S$ ,要构造一个长度为 $N$ 的字符串 $T$ 。起初 $T$ 是一个空串, 随后反复进行如下操作:从 $S$ 的头部或者尾部删除一个字符加到 $T$ 的尾部, 构造一个字典序尽可能小的字符串 $T$ 题解: 从字典序的性质, 无论 $T 阅读全文
posted @ 2018-08-29 10:58 _Zlrrr 阅读(181) 评论(0) 推荐(0)
摘要: 练习优先队列的第一道题 题意: 一辆卡车需要行驶 $L$ 的距离, 卡车油箱里有 $P$ 单位的油 , 每行驶一单位长度耗费一单位的油, 在沿途有 $N$ 个加油站 ,第 $i$ 个加油站在距离起点 $Ai$ 的位置,可以加 $Bi$ 单位的油,假设油箱容量无限大, 最少加多少次油可以到达终点 样例 阅读全文
posted @ 2018-08-28 13:11 _Zlrrr 阅读(143) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2037 Problem Description “今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑 阅读全文
posted @ 2018-08-26 09:50 _Zlrrr 阅读(150) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/68264#problem/R The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separat 阅读全文
posted @ 2018-08-25 14:32 _Zlrrr 阅读(348) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/M There is a beautiful river in a small village. N rocks are arranged in a straight line numbered 1 to N from 阅读全文
posted @ 2018-08-24 13:12 _Zlrrr 阅读(245) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/L Out of N soldiers, standing in one line, it is required to choose several to send them scouting. In order t 阅读全文
posted @ 2018-08-24 13:09 _Zlrrr 阅读(238) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/K n people numbered 1 to n around a circle, we eliminate every second remaining person until only one survive 阅读全文
posted @ 2018-08-24 13:06 _Zlrrr 阅读(209) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/J Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any 阅读全文
posted @ 2018-08-24 13:03 _Zlrrr 阅读(250) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/H Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that 阅读全文
posted @ 2018-08-24 12:37 _Zlrrr 阅读(170) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/67836#problem/G People in Silverland use square coins. Not only they have square shapes but also their values are square nu 阅读全文
posted @ 2018-08-24 12:31 _Zlrrr 阅读(247) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 87 下一页