#277. 1212
1212
No testdata at current.
A Simple Task
题面翻译
求简单无向图的环数
题目描述
Given a simple graph, output the number of simple cycles in it. A simple cycle is a cycle with no repeated vertices or edges.
输入格式
The first line of input contains two integers and ( , ) – respectively the number of vertices and edges of the graph. Each of the subsequent lines contains two integers and , ( , ) indicating that vertices and are connected by an undirected edge. There is no more than one edge connecting any pair of vertices.
输出格式
Output the number of cycles in the given graph.
样例 #1
样例输入 #1
4 6
1 2
1 3
1 4
2 3
2 4
3 4
样例输出 #1
7
提示
The example graph is a clique and contains four cycles of length 3 and three cycles of length 4.