結果

問題 No.623 fudan no modulus to tigau
ユーザー tailstails
提出日時 2019-07-30 16:37:09
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-18 08:14:09
合計ジャッジ時間 1,758 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
4,380 KB
testcase_01 AC 67 ms
4,376 KB
testcase_02 AC 64 ms
4,376 KB
testcase_03 AC 64 ms
4,376 KB
testcase_04 AC 65 ms
4,376 KB
testcase_05 AC 64 ms
4,376 KB
testcase_06 AC 65 ms
4,376 KB
testcase_07 AC 62 ms
4,376 KB
testcase_08 AC 60 ms
4,376 KB
testcase_09 AC 59 ms
4,376 KB
testcase_10 AC 58 ms
4,380 KB
testcase_11 AC 62 ms
4,380 KB
testcase_12 AC 3 ms
4,380 KB
testcase_13 AC 5 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read n
for((i=1;i++<n;)){
read {a..c}[i]
}
read q
for((;q--;)){
read -d\  f[f=1]
'f[i]=r=(g=f[k=b[h=f[c[i]],i]],a[i]<2?g+h:(a[i]<3?k:g)*h)%998244353,i++<n&&_'
echo $[i=2,_,r]
}
0