CF11D A Simple Task

    • 116通过
    • 233提交
  • 题目来源 CodeForces 11D
  • 评测方式 RemoteJudge
  • 标签 动态规划,动规,dp 枚举,暴力 状态压缩,状压
  • 难度 省选/NOI-
  • 时空限制 2000ms / 256MB

题解

  • 提示:收藏到任务计划后,可在首页查看。
  • 体验新版界面

    最新讨论 显示

    推荐的相关题目 显示

    题意翻译

    求简单无向图的环数

    题目描述

    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
    

    说明

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

    提示
    标程仅供做题后或实在无思路时参考。
    请自觉、自律地使用该功能并请对自己的学习负责。
    如果发现恶意抄袭标程,将按照I类违反进行处理。