結果

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

テストケース

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

ソースコード

diff #

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