Numbers Combination

시간 제한2초메모리 제한2048 MB

요약
1 ≤ A_i ≤ i이고 합이 K인 수열의 개수를 998244353으로 나눈 나머지로 구한다.
난이도

보통10점 중 7점

유형
조합론, 동적 계획법
정답자
아직 제출이 없습니다

문제

You are given two integers, NN and KK. Determine the number of sequences of integers (A_1,A_2,…,A_N)(A\_1, A\_2, \dots , A\_N ) that satisfy

  • 1≤A_i≤i1 ≤ A\_i ≤ i for 1≤i≤N1 ≤ i ≤ N, and
  • A_1+A_2+⋯+A_N=KA\_1 + A\_2 + \cdots + A\_N = K.

Since the answer can be very large, calculate the answer modulo 998,244,353998\\, 244\\, 353.

입력

Input consists of two integers NN KK (1≤N≤100,0001 ≤ N ≤ 100\\, 000; N≤K≤200,000N ≤ K ≤ 200\\, 000).

출력

Output in a line an integer representing the answer modulo 998,244,353998\\, 244\\, 353.

예제5

  1. 예제 1

    입력
    3 5
    
    예상 출력
    2
    
  2. 예제 2

    입력
    5 6
    
    예상 출력
    4
    
  3. 예제 3

    입력
    7 7
    
    예상 출력
    1
    
  4. 예제 4

    입력
    1 2
    
    예상 출력
    0
    
  5. 예제 5

    입력
    19014 86712
    
    예상 출력
    270258410