摘要: 逆序最大字典序拓扑序反向建边,逆序字典序最大。。#include#include#include#include#include#include#define N 1000005using namespace std;priority_queue q;int e=1,... 阅读全文
posted @ 2017-08-21 17:13 Ren_Ivan 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 发现:只在所有自己的城市建水泵一定是最优解。所以对自己的城市按高度排序,该城市不用建的前提是从他出发经过一条高度都小于等于他的路径能到达一个已经修建水泵的sort+bfs......#include#include#include#include#include#de... 阅读全文
posted @ 2017-08-21 15:59 Ren_Ivan 阅读(104) 评论(0) 推荐(0) 编辑