// Problem: #10098. 「一本通 3.6 例 1」分离的路径 // Contest: LibreOJ // URL: https://loj.ac/p/10098 // Memory Limit: 64 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org)
#include<bits/stdc++.h> usingnamespace std; #define int long long inlineintread(){int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+ (x<<3)+(ch^48);ch=getchar();}return x*f;} #define M 10010 //#define mo #define N 5010 structnode { int x, y, n; }d[M*2]; int n, m, i, j, k; int h[N], f[N], c[N], dep[N], rd[N]; int lf, u, v;
voidcun(int x, int y) { d[++k].x=x; d[k].y=y; d[k].n=h[x]; h[x]=k; }