結果

問題 No.2430 Damage Zone
ユーザー tailstails
提出日時 2023-08-18 22:25:16
言語 cLay
(20240104-1)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 3,357 ms
コンパイル使用メモリ 183,912 KB
実行使用メモリ 13,852 KB
最終ジャッジ日時 2023-08-18 22:25:23
合計ジャッジ時間 4,469 ms
ジャッジサーバーID
(参考情報)
judge9 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
13,852 KB
testcase_01 AC 7 ms
13,596 KB
testcase_02 AC 8 ms
13,832 KB
testcase_03 AC 7 ms
13,692 KB
testcase_04 AC 6 ms
13,588 KB
testcase_05 AC 7 ms
13,688 KB
testcase_06 AC 7 ms
13,548 KB
testcase_07 AC 8 ms
13,616 KB
testcase_08 AC 7 ms
13,588 KB
testcase_09 AC 7 ms
13,680 KB
testcase_10 AC 6 ms
13,688 KB
testcase_11 AC 8 ms
13,576 KB
testcase_12 AC 8 ms
13,776 KB
testcase_13 AC 7 ms
13,624 KB
testcase_14 AC 8 ms
13,680 KB
testcase_15 AC 8 ms
13,636 KB
testcase_16 AC 9 ms
13,600 KB
testcase_17 AC 7 ms
13,732 KB
testcase_18 AC 7 ms
13,580 KB
testcase_19 AC 7 ms
13,540 KB
testcase_20 AC 8 ms
13,676 KB
testcase_21 AC 8 ms
13,672 KB
testcase_22 AC 8 ms
13,628 KB
testcase_23 AC 7 ms
13,640 KB
testcase_24 AC 8 ms
13,700 KB
testcase_25 AC 8 ms
13,792 KB
testcase_26 AC 9 ms
13,600 KB
testcase_27 AC 9 ms
13,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
Mint f[100][100][200];
{
	ll@h,@w,@k;
	string@s[h];
	f[0][0][k-1]=1;
	rep(y,h){
		rep(x,w){
			ll c=s[y][x];
			if(c=='.'){
				rep(u,k){
					if(y>0) f[y][x][u]+=f[y-1][x][u];
					if(x>0) f[y][x][u]+=f[y][x-1][u];
				}
			}
			if(c=='o'){
				rep(u,k-1){
					if(y>0) f[y][x][u]+=f[y-1][x][u+1];
					if(x>0) f[y][x][u]+=f[y][x-1][u+1];
				}
			}
		}
	}
	wt(sum(((f[h-1][w-1]))(k)));
}
0