結果

問題 No.3 ビットすごろく
ユーザー tailstails
提出日時 2019-07-25 14:32:38
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 2,893 ms / 5,000 ms
コード長 135 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 5,184 KB
実行使用メモリ 5,860 KB
最終ジャッジ日時 2023-09-14 23:50:06
合計ジャッジ時間 36,292 ms
ジャッジサーバーID
(参考情報)
judge11 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 196 ms
4,380 KB
testcase_04 AC 40 ms
4,376 KB
testcase_05 AC 785 ms
4,612 KB
testcase_06 AC 232 ms
4,376 KB
testcase_07 AC 105 ms
4,376 KB
testcase_08 AC 512 ms
4,392 KB
testcase_09 AC 1,302 ms
5,032 KB
testcase_10 AC 1,937 ms
5,324 KB
testcase_11 AC 1,092 ms
4,876 KB
testcase_12 AC 753 ms
4,632 KB
testcase_13 AC 154 ms
4,380 KB
testcase_14 AC 1,784 ms
5,256 KB
testcase_15 AC 2,839 ms
5,832 KB
testcase_16 AC 2,525 ms
5,636 KB
testcase_17 AC 2,729 ms
5,776 KB
testcase_18 AC 122 ms
4,380 KB
testcase_19 AC 2,893 ms
5,848 KB
testcase_20 AC 28 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 1,835 ms
5,360 KB
testcase_23 AC 2,875 ms
5,840 KB
testcase_24 AC 2,855 ms
5,860 KB
testcase_25 AC 2,778 ms
5,816 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 174 ms
4,376 KB
testcase_28 AC 2,269 ms
5,520 KB
testcase_29 AC 1,107 ms
4,952 KB
testcase_30 AC 7 ms
4,380 KB
testcase_31 AC 9 ms
4,380 KB
testcase_32 AC 958 ms
4,808 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$f$f*-1))){
f=,q[w++]=a+p[a]
}
echo ${z[n]--1}
0