题库练习 A Simple Task
← 上一题 下一题 →

A7778 | A Simple Task

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

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 $n$ and $m$ ( $1<=n<=19$ , $0<=m$ ) – respectively the number of vertices and edges of the graph. Each of the subsequent $m$ lines contains two integers $a$ and $b$ , ( $1<=a,b<=n$ , $a≠b$ ) indicating that vertices $a$ and $b$ 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
4 6
1 2
1 3
1 4
2 3
2 4
3 4
输出 #1
7
C++ 编辑器
输入
输出