![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图之欧拉(回)路
Nothing_227
Nothing is impossible!
展开
-
欧拉路(一) HihoCoder - 1176
题目链接点击: HihoCoder - 1176欧拉路:无向图存在欧拉路,当且仅当该图只存在 2个或者0个(0个即欧拉回路) 点为的度(入度+出度)为奇数,且该图是连通图。(本题判断条件+并查集找根) 有向图存在欧拉路,当且仅当 两个点度为奇数(一个入度比出度少1,,另一个反之),其他所有顶点的入度等于出度,且该图是连通图。欧拉回路:无向图存在欧拉回路,当且仅当该图所有顶点...原创 2018-08-15 16:43:21 · 210 阅读 · 0 评论 -
欧拉路(二) HihoCoder - 1181
题目链接点击:HihoCoder-1181题目简介:给你一些数如下:在上一回中小Hi和小Ho控制着主角收集了分散在各个木桥上的道具,这些道具其实是一块一块骨牌。然后首尾相连如下;#include <bits/stdc++.h>using namespace std;const int maxn = 1e3+5;int n,m,i,j,a,b;int p...原创 2018-08-15 19:42:03 · 179 阅读 · 0 评论 -
Play on Words UVA - 10129
Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very impo...原创 2018-08-16 11:03:34 · 228 阅读 · 0 评论 -
Inspector's Dilemma UVA - 12118
In a country, there are a number of cities. Each pair of city is connected by a highway, bi-directional of course. A road-inspector’s task is to travel through the highways (in either direction) and t...原创 2018-08-16 19:58:32 · 273 阅读 · 0 评论