Under construction

Still being built. Things may change

Primal Collection

Time limit1sMemory limit2048 MB

Summary
Count the primal arrays over values 1 to N+1 (missing S) for which inserting S at position N+1 and sifting it up takes exactly K swaps.
Level

Hard8 of 10

Topics
Combinatorics, Tree, Dynamic programming
Solved
No attempts yet

Problem

You are given an array AA, which initially has a size of NN (indexed from 11 to NN) containing distinct integers with values between 11 and N+1N + 1 inclusive. It is known that this array is primal, that is, for any index i>1i > 1, AiA_i is always smaller than A⌊i/2⌋A_{\lfloor i/2 \rfloor}.

Denote SS as the value between 11 and N+1N + 1 that does not appear in A1,A2,…,ANA_1, A_2, \dots, A_N. You want to append one new element to AA, namely AN+1A_{N+1}, with the value SS. Then the following algorithm is executed.

algorithm(A):
  x = N + 1
  counter = 0
  while x > 1:
    if A[x] > A[floor(x / 2)]:
      swap(A[x], A[floor(x / 2)]);
      counter = counter + 1
    x = floor(x / 2)
  return counter

Count the number of possible initial arrays AA such that, after appending SS and executing algorithm(A), the algorithm returns KK. The initial array AA contains distinct integers with values between 11 and N+1N + 1 inclusive, excluding SS, and must be primal. Since the answer can be very large, print it modulo 998 244 353998\,244\,353.

Input

A single line with three integers NN, SS, KK (1≤N≤100 0001 \le N \le 100\,000; 1≤S≤N+11 \le S \le N + 1; 0≤K≤N0 \le K \le N).

Output

A single integer, the number of possible initial arrays AA that satisfy the conditions above, modulo 998 244 353998\,244\,353.

Examples3

  1. Example 1

    Input
    5 3 1
    
    Expected output
    4
    
  2. Example 2

    Input
    2 2 1
    
    Expected output
    0
    
  3. Example 3

    Input
    7 6 2
    
    Expected output
    40