摘要: https://www.luogu.com.cn/problem/P3750 期望$DP$ 运用贪心的策略,如果我们想要尽快关闭所有的灯,显然从编号大的到编号小的关更优 那么我们可以计算出关灯的最小次数$cnt$ 如果$cnt \le k$,显然答案就是$cnt$ 如果$cnt > k$,我们考虑$ 阅读全文
posted @ 2020-08-07 20:46 GK0328 阅读(75) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P5380 模拟 纯粹的大模拟,一点贪心啥的都没有 代码蛮好调的(虽然我太菜$WA$了好多发) \(Code:\) #include<cstdio> #include<iostream> #include<algorithm> #in 阅读全文
posted @ 2020-08-07 20:05 GK0328 阅读(72) 评论(0) 推荐(0) 编辑