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

8353번 - Cliquers 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB56151537.500%

문제

An undirected graph is called a cliquer if each connected component of the graph is a clique. Maurycy has drawn all cliquers with n vertices on a piece of paper and is going to assess beauty of each of them with a number from the set {1, ..., m} (in particular, different cliquers may be assigned equal grades). In how many ways can he do this? The result should be computed modulo 109 - 401. The figure below depicts all cliquers for n = 3.

입력

The only line of the standard input contains two integers n and m (1 ≤ n, m ≤ 200 000), separated by a single space and denoting the number of vertices of each cliquer and the number of grades respectively.

출력

The only line of the standard output should contain the number of possible sets of grades modulo 109 - 401.

제한

예제 입력 1

3 2

예제 출력 1

8

힌트

출처

Contest > Algorithmic Engagements > PA 2008 5-1번

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

출처

대학교 대회

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

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