Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <cstdio>#include <iostream>#include <cstdlib>#include <cstring>#include <vector>#include <algorithm>#include <deque>#include <queue>#define INF 0x3f3f3f3fusing namespace std;struct Edge{int to, val, next;} edge[2000000];int n, m, tot;int head[20100], level[20100], cur[20100];void add_edge(int from, int to, int val){edge[tot].to = to;edge[tot].val = val;edge[tot].next = head[from];head[from] = tot++;edge[tot].to = from;edge[tot].val = 0;edge[tot].next = head[to];head[to] = tot++;}int bfs(int s,int t){queue<int> que;que.push(s);