/ OPS / 题库 /

The kinds of necklace

The kinds of necklace

#描述#
One day , DD gets several beads , he wants to make these beads a necklace . But not every bead can link to each other;every bead should link to some particular bead(s). Now , DD wants to know how many kinds of necklace he can make.

#格式#
##输入格式##
It consists of multi-case .

Every case start with two integers N,M ( 1&lt=N&lt=18,M&lt=N*N )

The followed M lines contains two integers a,b ( 1&lt=a,b&lt=N ) which means the ath bead and the bth bead are able to be linked.

##输出格式##
An integer , which means the number of kinds that the necklace could be.

#样例1#
##样例输入1##

3 3
1 2
1 3
2 3

##样例输出1##

2

#限制#
2000ms
65536KB

#提示#

#来源#

信息

ID
1635
难度
10
分类
category1 点击显示
标签
递交数
1
已通过
0
通过率
0%
上传者