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

28009번 - LaLa and Monster Hunting (Part 2) 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
6 초 1024 MB86571.429%

문제

A dreadful monster has been witnessed in a forest near the city of $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ Sharia, and a group of valorous adventurers will hunt it down in few days before it hurt anyone. However, $\color{blue}{\text{LaLa}}$ knows that the real reason those adventurers are willing to take the risk is to obtain the rare $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ stone that the monster is known to produce in its intestines. $\color{blue}{\text{LaLa}}$ would like to obtain the $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ stone before they do, as it is known to be quite beautiful.

Currently, $\color{blue}{\text{LaLa}}$ knows a rough estimate of the location of the monster. However, the monster excels at camouflage, so it's really hard to hunt it down when it's hiding in the network of branches.

For the sake of simplicity, we'll model the monster as a graph $G$ with 6ドル$ vertices described below:

The network of branches can be modeled as a simple graph $H$. A candidate is a subgraph of $H$ that is isomorphic to $G$. In other words, it is a graph obtained by deleting some edges from $H,ドル and then deleting some vertices that none of the remaining edges are incident to, whose vertices can be renumbered so that it coincides with $G$. $\color{blue}{\text{LaLa}}$ will now have to examine all possible candidates to search and hunt the monster down.

Write a program that computes the number of candidates $\color{blue}{\text{LaLa}}$ will have to examine, modulo 998ドル,244円,353円$.

입력

The input describes the branch network $H$ and is given in the following format:

$N$ $M$

$u_0$ $v_0$

$u_1$ $v_1$

$\vdots$

$u_{M-1}$ $v_{M-1}$

where $N$ is the number of joints, numbered from 0ドル$ to ${N-1}$ and $M$ is the number of branches, $i$-th of which connects the joints $u_i$ and $v_i$.

The input satisfies the following constraints:

  • All the numbers in the input are integers.
  • 2ドル \le N \le 100,000円$
  • 0ドル \le M \le 100,000円$
  • 0ドル \le u_i < v_i < N$ for all integers 0ドル \le i < M$
  • $u_i \ne u_j$ or $v_i \ne v_j$ for all integers 0ドル \le i < j < M$

Note that the network is not necessarily connected.

출력

The output should be a single integer equal to the number of candidates, modulo 998ドル,244円,353円$.

제한

예제 입력 1

6 7
0 1
1 2
0 2
2 3
3 4
4 5
3 5

예제 출력 1

4

예제 입력 2

6 15
0 1
0 2
0 3
0 4
0 5
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5

예제 출력 2

360

노트

The followings illustrate the 4ドル$ candidates (the regular edges) of the branch network in the first sample test.

출처

Camp > Osijek Competitive Programming Camp > Winter 2023 > Day 9: Magical Story of LaLa F번

  • 문제를 만든 사람: aeren
(追記) (追記ここまで)

출처

대학교 대회

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

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