贪心
丽尔巴茨
这个作者很懒,什么都没留下…
展开
-
hdu1050 贪心
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side and south side along the corrid...原创 2019-06-15 16:12:29 · 166 阅读 · 0 评论 -
p1607 庙会班车 区间贪心加线段树
假如只有一辆班车,就是典型的普通区间贪心,贪心的维护终点从小到大选即可但是有多辆班车,其实也是一样的可以按终点贪心,然后线段树维护某段区间的班车用了多少就可以了,然后还有就是他这区间是左闭右开的,所以需要添加牛时,右端点-1;以下给出线段树版ac代码,据说数据水,貌似暴力不用线段树也能过;#include <stdio.h>#include <string.h>#...原创 2019-09-09 15:32:24 · 128 阅读 · 0 评论