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<=N<=18,M<=N*N )
The followed M lines contains two integers a,b ( 1<=a,b<=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
#提示#
#来源#