贪心
文章平均质量分 82
weixin_46250672
这个作者很懒,什么都没留下…
展开
-
Radar Installation
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the原创 2021-02-21 22:52:48 · 228 阅读 · 0 评论 -
Pavel and Triangles
##Pavel and Triangles Pavel has several sticks with lengths equal to powers of two. He has a0 sticks of length 20=1, a1 sticks of length 21=2, …, an−1 sticks of length 2n−1. Pavel wants to make the maximum possible number of triangles using these sticks. T原创 2021-02-11 22:18:31 · 87 阅读 · 0 评论 -
HihoCoder-1051 (贪心)
小Ho给自己定了一个宏伟的目标:连续100天每天坚持在hihoCoder上提交一个程序。100天过去了,小Ho查看自己的提交记录发现有N天因为贪玩忘记提交了。于是小Ho软磨硬泡、强忍着小Hi鄙视的眼神从小Hi那里要来M张"补提交卡"。每张"补提交卡"都可以补回一天的提交,将原本没有提交程序的一天变成有提交程序的一天。小Ho想知道通过利用这M张补提交卡,可以使自己的"最长连续提交天数"最多变成多少天。 Input 第一行是一个整数T(1 <= T <= 10),代表测试数据的组数。 每个测试数据第原创 2020-10-25 08:29:23 · 54 阅读 · 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 of the strip. For each sprinkler we are given its position as the distance from the left end of the center原创 2020-07-25 22:13:56 · 221 阅读 · 0 评论