No.2514 Twelvefold Way Returns
レベル :
/ AI推定難易度 : 2175
/ 実行時間制限 : 1ケース 3.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 27
作問者 :
PCTprobability
/ テスター :
Mizar
👑
amentorimaru
タグ : / 解いたユーザー数 27
作問者 :
PCTprobability
/ テスター :
amentorimaru
問題文最終更新日: 2023-10-20 20:13:03
English (AI translation)
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 409
(順位表)
の他の問題:
Problem Statement
There are $N$ distinguishable balls and $M$ distinguishable boxes.
Among the ways to put each ball into one of the boxes, find the number of ways such that the number of balls in every box is $1$ in $\bmod\ 3$, modulo $998244353$.Input
$N$ $M$
- $1 \le N \le 10^9$
- $1 \le M \le 300$
- All inputs are integers.
Output
Output the answer.
Sample
Sample 1
Input
5 2
Output
10
Number the balls $1,2,3,4,5$. There are $10$ valid ways to place the balls, such as $\{1\},\{2,3,4,5\}$ and $\{1,3,4,5\},\{2\}$.
Sample 2
Input
100 50
Output
0
There may be not even $1$ valid way.
Sample 3
Input
123456789 123
Output
26653017
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。