Logo
(追記) (追記ここまで)

16041번 - Double Clique 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB3271078334.298%

문제

You are given an undirected graph G with n nodes and m edges. The set of vertices is V and the set of edges is E.

Let the Complement of G be G'. The Complement of a graph is a graph with all of the same nodes, but if there’s no edge between nodes a and b in G, then there is an edge between a and b in G', and if there is an edge between a and b in G, then there is no edge between a and b in G'.

A Clique is a subset of nodes that have an edge between every pair. A subset of nodes S is called a Double Clique if S forms a clique in G, and V − S forms a clique in G'. Note that an empty set of nodes is considered a clique.

Given a graph, count the number of double cliques in the graph modulo 109 + 7.

입력

Each input will consist of a single test case. Note that your program may be run multiple times on different inputs. Each test case will begin with a line with two integers n and m (1 ≤ n, m ≤ 2 × 105), where n is the number of nodes and m is the number of edges in the graph. The nodes are numbered 1..n. Each of the next m lines will contain two integers a and b (1 ≤ a < b ≤ n), representing an edge between nodes a and b. The edges are guaranteed to be unique.

출력

Output a single integer, which is the number of Double Cliques in the graph modulo 109 + 7.

제한

예제 입력 1

3 3
1 3
1 2
2 3

예제 출력 1

4

힌트

출처

University > North American Invitational Programming Contest > NAIPC 2018 B번

Contest > Open Cup > 2017/2018 Season > Stage 16: Grand Prix of America B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /