英语翻译

英语翻译
Your task is so easy.I will give you an undirected graph,and you just need to tell me whether the graph is just a circle.A cycle is three or more nodes V1,V2,V3,...Vk,such that there are edges between V1 and V2,V2 and V3,...Vk and V1,with no other extra edges.The graph will not contain self-loop.Furthermore,there is at most one edge between two nodes.
Input
There are multiple cases (no more than 10).
The first line contains two integers n and m,which indicate the number of nodes and the number of edges (1 < n < 10,1
英语人气:621 ℃时间:2019-10-19 16:15:07
优质解答
你的任务很简单.我会给你一个无向图,你需要告诉我这个图标是否仅仅是个圆圈.一个圆圈有3个或3个以上的节点V1,V2,V3……Vk等等,这样一来,V1与V2,V2与V3,……Vk与V1间就会有很多条棱,并且不会有多余的棱.这个图标不会有自循环,两个节点间最多有一条棱.
输入
有很多种情况(不超过10)
第一条线包含两个整数n和m,表明节点的数量和节点之间棱的数量(1 < n < 10,1
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版