問題一覧 > 通常問題

No.2711 Connecting Lights

レベル : / AI推定難易度 : 1075 / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 145
作問者 : Nafmo2 / テスター : dyktr_06 sepa38 ryota2357
お気に入りにしたユーザー ProblemId : 9988 / 自分の提出
問題文最終更新日: 2024-03-27 15:52:38
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 425 (MMA Contest 018) (順位表) の他の問題:

Problem Statement

There is a grid with $N$ rows and $M$ columns, and each cell contains a light bulb that can be freely switched on or off.
Here, for the bulb in the $i$-th row from the top and the $j$-th column from the left, we write

  • when the bulb is on: $A_{i,j} = 1$
  • when the bulb is off: $A_{i,j} = 0$
Find the number, modulo $998244353$, of ways to set the bulbs such that for every column $j$ satisfying $1 \leq j \leq M-1$, the number of rows in which the bulbs in both column $j$ and column $j+1$ are on is at least $K$.

More precisely, output the number, modulo $998244353$, of ways to set the bulbs that satisfy the following condition.

  • For every $j$ satisfying $1 \leq j \leq M-1$, the following condition holds:
    • There are at least $K$ values of $i$ such that $A_{i,j} = 1$ and $A_{i,j+1} = 1$.

Input

$N\ M \ K$

  • $1 \leq K \leq N \leq 5$
  • $1 \leq M \leq 2 \times 10^4$
  • All inputs are integers.

Output

Output the number, modulo $998244353$, of ways to set the bulbs that satisfy the condition. End the output with a newline.

Sample

Sample 1
Input
2 2 1
Output
7

The following $7$ ways are all of them.

Sample 2
Input
3 4 1
Output
1129

Sample 3
Input
5 10 3
Output
252507990

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。