codeforces723E】的更多相关文章

题意:给你n点m边的图,然后让你确定每条边的方向,使得入度=出度的点最多 . 度数为偶数的点均能满足入度 = 出度. 证明:度数为奇数的点有偶数个,奇度点两两配对连无向边,则新图存在欧拉回路,则可使新图所有点入度 = 出度. #include <bits/stdc++.h> using namespace std; #define X first #define Y second typedef long long ll; ; int d[N], head[N], tot; int to[N*…
One-Way Reform CodeForces - 723E There are n cities and m two-way roads in Berland, each road connects two cities. It is known that there is no more than one road connecting each pair of cities, and there is no road which connects the city with itsel…