CF11D.A Simple Task

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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 nn and mm ( 1<=n<=191<=n<=19 , 0<=m0<=m ) – respectively the number of vertices and edges of the graph. Each of the subsequent mm lines contains two integers aa and bb , ( 1<=a,b<=n1<=a,b<=n , aba≠b ) indicating that vertices aa and bb 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
    

说明/提示

The example graph is a clique and contains four cycles of length 3 and three cycles of length 4.

首页