結果

問題 No.3 ビットすごろく
ユーザー tailstails
提出日時 2019-07-25 15:16:24
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 2,658 ms / 5,000 ms
コード長 145 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 5,840 KB
最終ジャッジ日時 2023-09-14 01:25:57
合計ジャッジ時間 33,159 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 196 ms
4,376 KB
testcase_04 AC 40 ms
4,380 KB
testcase_05 AC 723 ms
4,576 KB
testcase_06 AC 223 ms
4,380 KB
testcase_07 AC 102 ms
4,384 KB
testcase_08 AC 478 ms
4,380 KB
testcase_09 AC 1,187 ms
5,032 KB
testcase_10 AC 1,726 ms
5,332 KB
testcase_11 AC 979 ms
4,844 KB
testcase_12 AC 673 ms
4,476 KB
testcase_13 AC 148 ms
4,380 KB
testcase_14 AC 1,617 ms
5,208 KB
testcase_15 AC 2,579 ms
5,776 KB
testcase_16 AC 2,181 ms
5,532 KB
testcase_17 AC 2,484 ms
5,840 KB
testcase_18 AC 121 ms
4,376 KB
testcase_19 AC 2,622 ms
5,740 KB
testcase_20 AC 28 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1,642 ms
5,228 KB
testcase_23 AC 2,658 ms
5,740 KB
testcase_24 AC 2,622 ms
5,744 KB
testcase_25 AC 2,558 ms
5,832 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 169 ms
4,376 KB
testcase_28 AC 2,076 ms
5,584 KB
testcase_29 AC 1,016 ms
4,908 KB
testcase_30 AC 7 ms
4,376 KB
testcase_31 AC 10 ms
4,376 KB
testcase_32 AC 872 ms
4,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read n
for((q=w=1;r<w;++i<n&&(p[i]=t=i&1?t+1:p[i/2])||z[r<m||(m=w,++v),a=q[r++]]|a>n||(z[a]=v,q[q[w++]=a+p[a],w++]=a-p[a]))){
:
}
echo ${z[n]--1}
0