摘要: https://vjudge.net/problem/HDU-2680 思路:单边,将终点看做起点,反向建立图,否则超时 #include <cstdio>#include <cstring>#include <iostream>using namespace std; const int maxn 阅读全文
posted @ 2017-10-30 14:32 unknownname 阅读(139) 评论(0) 推荐(0) 编辑
摘要: /* O(V^2) */ #include<cstdio>#include<iostream>#include<cstring>using namespace std; int v,e;//顶点数const int INF=1<<30;const int max_v=1e4+5;int d[max_ 阅读全文
posted @ 2017-10-30 14:21 unknownname 阅读(119) 评论(0) 推荐(0) 编辑
摘要: /*可解决图中存在环(负权值)问题,dijksta则不能 O(V*E) */ #include<iostream>#include<cstdio>#include<cstring>using namespace std;const int max_v=1170;const int max_e=217 阅读全文
posted @ 2017-10-30 14:11 unknownname 阅读(111) 评论(0) 推荐(0) 编辑