Mock CCC '21 S5 - Clique and Independent Set

View as PDF

Submit solution


Points: 30 (partial)
Time limit: 0.25s
Memory limit: 1G

Problem types

You are given an undirected graph of N vertices and M edges. Compute the number of subsets of vertices which are cliques, where the vertices not in the subset form an independent set.

Constraints

1N,M2105

Input Specification

The first line contains two space-separated integers, N and M.

Each of the next M lines contain two space-separated integers, a and b, indicating an edge between a and b. The input is guaranteed to contain no self-loops or parallel edges.

Output Specification

Count the number of valid subsets modulo 109+7.

Sample Input

Copy
3 3
1 2
1 3
2 3

Sample Output

Copy
4

Comments

There are no comments at the moment.