摘要: 水题#include #include using namespace std;const int MAXN = 1e5;int arr[MAXN];int ans = 0;int N, M;bool find(... 阅读全文
posted @ 2018-07-24 18:54 张浦 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 网上都是二分搜索答案其实过程也可以二分搜索洛谷有个扔瓶盖一样的#include #include using namespace std;const int MAXN = 1e5 + 50;int cow[MA... 阅读全文
posted @ 2018-07-24 17:42 张浦 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 按左点排序能干就干 干不了加人但这次数据非常大 手动模拟超时需要用到优先队列 或 mutilset队列能解决的set 都可以解决set支持性更佳 所以个人更倾向于set#include #include #inc... 阅读全文
posted @ 2018-07-24 17:01 张浦 阅读(89) 评论(0) 推荐(0) 编辑
摘要: bfs 有稳定向下搜索(距离恒定)的特性常用来求最优解(首解必定最优)用队列维护搜索可保持其顺序特性bfs的过程比dfs容易理解的多在此不做记录该题单bfs可以过七个点三个tle需要优化仔细推一遍可以发现每次求得... 阅读全文
posted @ 2018-07-24 16:47 张浦 阅读(85) 评论(0) 推荐(0) 编辑