![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
Fool _one
so cool~
展开
-
UCF Local Programming Contest B.SGA President
题目链接:B.SGA President我的解法:在打比赛时,自认为没问题,但一直wa,wa了四五遍,但还是没有发现问题,虽然办法比较蠢,但好歹能解出答案(测试好几个数据没有问题)…,求大佬指点。#include <iostream>#include <cstring>#include <algorithm>const int N = 100000 ...原创 2020-03-30 21:39:10 · 202 阅读 · 0 评论 -
旅行家的预算(贪心法~~)
可能有人说这是一题贪心水题,但是我却觉得虽然思路明白,但其代码实际上并不好写。 假设在某一站时,该站为Pos,我们看,向后探测看能否找到油价比它便宜且最便宜的油价,这时分为两种情况:  ...原创 2019-08-03 18:35:24 · 365 阅读 · 0 评论