摘要: tarjan + topsort(就是个DAG上的dp) cpp include include include using namespace std; int price[100010]; struct node { int point; int nxt; }; node l1[1000010] 阅读全文
posted @ 2018-03-27 19:13 Lance1ot 阅读(131) 评论(0) 推荐(0) 编辑
摘要: "题目" 真可以,我昨天写的全不对。今天写的一次ac 就是二分答案+spfa 阅读全文
posted @ 2018-03-27 19:09 Lance1ot 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 对于边权都为相同的图,求最短路可以用bfs "题目" cpp include include include include using namespace std; struct node { int point; int nxt; }; node line[4000100]; int head[ 阅读全文
posted @ 2018-03-27 18:15 Lance1ot 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 能看出来是多源最短路。只能用floyed。 但是这道题确实加深了我对floyed的理解 "题目" 阅读全文
posted @ 2018-03-27 18:12 Lance1ot 阅读(115) 评论(0) 推荐(0) 编辑