思路:
直接缩点,然后用dij跑
c o d e code code
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<queue>
using namespace std;
int n, m, dfn[200010], low[200010], cnt, stack[200010], top, tmp;
int c[200010], head[200010], tot, dis[200010];
bool v[200010];
struct node
{
int from, to, next, w;
}b[1000010], e[1000010];
void add(int x, int y, int w)
{
b[