結果

問題 No.1693 Invasion
ユーザー tailstails
提出日時 2021-10-01 21:39:34
言語 cLay
(20240104-1)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 3,844 ms
コンパイル使用メモリ 175,932 KB
実行使用メモリ 7,120 KB
最終ジャッジ日時 2023-09-26 16:43:39
合計ジャッジ時間 4,965 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,468 KB
testcase_01 AC 2 ms
5,464 KB
testcase_02 AC 2 ms
5,476 KB
testcase_03 AC 2 ms
5,456 KB
testcase_04 AC 2 ms
5,472 KB
testcase_05 AC 2 ms
5,408 KB
testcase_06 AC 2 ms
5,404 KB
testcase_07 AC 2 ms
5,412 KB
testcase_08 AC 2 ms
5,612 KB
testcase_09 AC 11 ms
6,784 KB
testcase_10 AC 8 ms
6,936 KB
testcase_11 AC 4 ms
6,092 KB
testcase_12 AC 8 ms
6,960 KB
testcase_13 AC 5 ms
6,108 KB
testcase_14 AC 5 ms
6,024 KB
testcase_15 AC 4 ms
5,676 KB
testcase_16 AC 7 ms
6,256 KB
testcase_17 AC 2 ms
5,412 KB
testcase_18 AC 15 ms
6,968 KB
testcase_19 AC 4 ms
7,020 KB
testcase_20 AC 2 ms
5,468 KB
testcase_21 AC 14 ms
7,020 KB
testcase_22 AC 14 ms
6,920 KB
testcase_23 AC 14 ms
7,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353

Comb<Mint>c;
ll d[1d5+1];

{
	ll@n,@m,@a[n];
	Mint z=1;
	rep(i,1,m+1){
		d[i]=ll_inf;
		rep(j,n){
			if(i>=a[j]){
				d[i]<?=d[i-a[j]]+1;
			}
		}
		if(d[i]<ll_inf){
			z+=c.C(m-d[i],i-d[i]);
		}
	}
	wt(z);
}
0