結果

問題 No.2530 Yellow Cards
ユーザー tailstails
提出日時 2023-11-03 23:39:29
言語 cLay
(20240104-1)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 3,574 ms
コンパイル使用メモリ 176,008 KB
実行使用メモリ 101,128 KB
最終ジャッジ日時 2023-11-03 23:39:36
合計ジャッジ時間 6,982 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
101,128 KB
testcase_01 AC 75 ms
101,128 KB
testcase_02 AC 74 ms
101,128 KB
testcase_03 AC 74 ms
101,128 KB
testcase_04 AC 73 ms
101,128 KB
testcase_05 AC 73 ms
101,128 KB
testcase_06 AC 73 ms
101,128 KB
testcase_07 AC 165 ms
101,128 KB
testcase_08 AC 168 ms
101,128 KB
testcase_09 AC 179 ms
101,128 KB
testcase_10 AC 169 ms
101,128 KB
testcase_11 AC 168 ms
101,128 KB
testcase_12 AC 166 ms
101,128 KB
testcase_13 AC 166 ms
101,128 KB
testcase_14 AC 140 ms
101,128 KB
testcase_15 AC 116 ms
101,128 KB
testcase_16 AC 119 ms
101,128 KB
testcase_17 AC 169 ms
101,128 KB
testcase_18 AC 104 ms
101,128 KB
testcase_19 AC 83 ms
101,128 KB
testcase_20 AC 86 ms
101,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
Mint d[5001][5002],z;
d[0][0]=1;
ll@n,@k;
rep(e,k){
	rep(x,e&1,n+1,2){
		if(x) d[e+1][x-1]+=d[e][x]*x;
		d[e+1][x+1]+=d[e][x]*(n-x);
	}
}
rep(x,k&1,n+1,2){
	z+=d[e][x]*((k-x)/2);
}
wt(z/Mint(n)**k+n);
0