摘要:
SPFA:bfs形式超时,各种优化还是超时,手敲循环队列还超,伤不起啊,有木有我必须晒晒代码,以泄我愤。slfView Code 1 #include <stdio.h> 2 #include <queue> 3 using std::deque; 4 #define MAXN 150010 5 #define MAX 30010 6 #define INF (1<<29) 7 int n,m; 8 deque <int> q; 9 struct node10 {11 int d,t;12 node* next;13 }*h1[MAX],e1[M 阅读全文