#include <iostream>
#include <cstdio>
#include <cstring>
#include <deque>
#include <algorithm>
const int maxnode = 1e4+3;
const int maxedge = 5e5+3;
#define INF 2147483647
using namespace std;
deque<int> Q;
int first[maxnode], next[maxedge], n, m, s;
int u[maxedge], v[maxedge], w[maxedge], dis[maxnode];
bool vis[maxnode];
inline int read() {
char c = getchar();
int x
SPFA双端队列优化
最新推荐文章于 2023-07-11 17:03:01 发布