아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

LaLa and Monster Hunting (Part 2)

시간 제한6초메모리 제한1024 MB

요약
주어진 그래프에서 고정된 6개 정점 패턴 그래프와 동형인 부분 그래프의 개수를 998244353으로 나눈 나머지로 구한다.
난이도

보통10점 중 7점

유형
그래프, 조합론, 구현
정답자
아직 제출이 없습니다

문제

A dreadful monster has been witnessed in a forest near the city of magic\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, LaLa\color{blue}{\text{LaLa}} knows that the real reason those adventurers are willing to take the risk is to obtain the rare magic\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. LaLa\color{blue}{\text{LaLa}} would like to obtain the magic\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, LaLa\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 GG with 66 vertices described below:

The network of branches can be modeled as a simple graph HH. A candidate is a subgraph of HH that is isomorphic to GG. In other words, it is a graph obtained by deleting some edges from HH, and then deleting some vertices that none of the remaining edges are incident to, whose vertices can be renumbered so that it coincides with GG. LaLa\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 LaLa\color{blue}{\text{LaLa}} will have to examine, modulo 998,244,353998\\,244\\,353.

입력

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

NN MM

u_0u\_0 v_0v\_0

u_1u\_1 v_1v\_1

⋮\vdots

u_M−1u\_{M-1} v_M−1v\_{M-1}

where NN is the number of joints, numbered from 00 to N−1{N-1} and MM is the number of branches, ii-th of which connects the joints u_iu\_i and v_iv\_i.

The input satisfies the following constraints:

  • All the numbers in the input are integers.
  • 2≤N≤100,0002 \le N \le 100\\,000
  • 0≤M≤100,0000 \le M \le 100\\,000
  • 0≤u_i<v_i<N0 \le u\_i < v\_i < N for all integers 0≤i<M0 \le i < M
  • u_i≠u_ju\_i \ne u\_j or v_i≠v_jv\_i \ne v\_j for all integers 0≤i<j<M0 \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,353998\\,244\\,353.

힌트

The followings illustrate the 44 candidates (the regular edges) of the branch network in the first sample test.

예제2

  1. 예제 1

    입력
    6 7
    0 1
    1 2
    0 2
    2 3
    3 4
    4 5
    3 5
    
    예상 출력
    4
    
  2. 예제 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
    
    예상 출력
    360