随笔分类 - 优先队列
摘要:这个就是哈夫曼树哇~ 我们仨英语太差了,跟榜时候才看出来是哈夫曼树雾 一个优先队列就可以搞定 1 #include <cstdio> 2 #include <algorithm> 3 #include <cstring> 4 #include <iostream> 5 #include <queue
阅读全文
摘要:题目 Vasya has an array of integers of length n. Vasya performs the following operations on the array: on each step he finds the longest segment of cons
阅读全文
摘要:有一条从南到北的航线,航线上有N个机场1-n从南到北分布,每天早上飞机从1飞到n,傍晚从n飞到1。有k组乘客,他们数量为M[k],从S飞到E,飞机上只有C个座位,计算每天飞机最多能拉多少乘客 贪心可以解决这个问题~(我一开始一直在想dp(lll¬ω¬)) 每个站点让所有乘客都上飞机,如果此时超载了,
阅读全文

浙公网安备 33010602011771号