你的任务很简单.我会给你一个无向图,你需要告诉我这个图标是否仅仅是个圆圈.一个圆圈有3个或3个以上的节点V1,V2,V3……Vk等等,这样一来,V1与V2,V2与V3,……Vk与V1间就会有很多条棱,并且不会有多余的棱.这个图标不会有自循环,两个节点间最多有一条棱.
输入
有很多种情况(不超过10)
第一条线包含两个整数n和m,表明节点的数量和节点之间棱的数量(1 < n < 10,1
英语翻译
英语翻译
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
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
优质解答
我来回答
类似推荐
猜你喜欢
- 11,2,4,7算出24点
- 2把一个底面积是47.1平方厘米,高3厘米的圆柱体橡皮泥,捏成一个底面半径是3厘米的圆锥,圆锥高是多少?
- 3再见了亲人主要内容与中心思想各是什么?求您了
- 4一轮船在静水中的速度为a km/h,水流的速度为b km /h,a>b.甲乙两个码头的距离是C km/h,问轮船往返一次时间
- 5汽车从A点由静止开始沿直线ACB先做匀加速直线运动,第4s末通过C点时关闭发动机开始做匀减速直线运动,
- 6100分和150分和120分满分多少分是及格,多少分是良好,多少分是优秀?
- 7在半径为1的⊙O中,弦AB,AC分别是2、3,则∠BAC的度数为( ) A.15° B.15°或75° C.75° D.15°或65°
- 8英文序数词以及其缩写形式急~~~-------需要的有1 2 3 5 9 twelev 里面还有
- 9about造句
- 10What thing do you calculate?Why does she want to burst into tears?