Codeforces - Mouse Hunt
题目链接:Codeforces - Mouse Hunt因为每个点的出度都为1,所以是一个基环内向树,所以每个联通块都是以环结尾。所以找到每个联通块的结尾环的最小值相加即可。AC代码:#pragma GCC optimize("-Ofast","-funroll-all-loops")#include<bits/stdc++.h>//#define int long l...