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

20591번 - Convex Sets On Graph 다국어

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

문제

A set of vertices of an undirected graph is convex if, for any two distinct vertices from the set, any simple path between them lies entirely within that set. Your task is to compute the number of convex subsets of vertices of a given graph.

입력

The first line of the input contains two integers $n$ and $m$ (1ドル \leq n \leq 3 \cdot 10^5$; $n - 1 \leq m \leq 3 \cdot 10^5$): the number of vertices and the number of edges correspondingly. The $i$-th of the following $m$ lines contains two space-separated integers $x$ and $y$: the endpoints of the $i$-th edge (1ドル \leq x, y \leq n$; $x \neq y$). It is guaranteed that the graph is connected and does not contain multiple edges.

출력

Print one number: the answer modulo prime number 998ドル,244円,353円$.

제한

예제 입력 1

3 2
1 2
2 3

예제 출력 1

7

예제 입력 2

3 3
1 2
2 3
3 1

예제 출력 2

5

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2020 > Day 2: SPb SU LOUD ENOUGH Contest C번

Contest > Open Cup > 2020/2021 Season > Stage 2: SPb SU LOUD ENOUGH Contest C번

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

출처

대학교 대회

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

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