結果

問題 No.3 ビットすごろく
ユーザー tailstails
提出日時 2019-07-25 15:12:06
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 4,237 ms / 5,000 ms
コード長 142 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 7,052 KB
最終ジャッジ日時 2023-09-14 23:55:26
合計ジャッジ時間 51,045 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 226 ms
4,376 KB
testcase_04 AC 44 ms
4,380 KB
testcase_05 AC 1,038 ms
5,212 KB
testcase_06 AC 259 ms
4,376 KB
testcase_07 AC 115 ms
4,376 KB
testcase_08 AC 625 ms
4,876 KB
testcase_09 AC 1,872 ms
5,824 KB
testcase_10 AC 2,709 ms
6,284 KB
testcase_11 AC 1,498 ms
5,664 KB
testcase_12 AC 991 ms
5,116 KB
testcase_13 AC 170 ms
4,376 KB
testcase_14 AC 2,517 ms
6,260 KB
testcase_15 AC 4,089 ms
7,032 KB
testcase_16 AC 3,453 ms
6,708 KB
testcase_17 AC 3,927 ms
7,004 KB
testcase_18 AC 138 ms
4,376 KB
testcase_19 AC 4,175 ms
6,960 KB
testcase_20 AC 31 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2,639 ms
6,344 KB
testcase_23 AC 4,010 ms
7,052 KB
testcase_24 AC 4,237 ms
7,020 KB
testcase_25 AC 4,039 ms
6,912 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 194 ms
4,380 KB
testcase_28 AC 3,308 ms
6,704 KB
testcase_29 AC 1,628 ms
5,708 KB
testcase_30 AC 8 ms
4,376 KB
testcase_31 AC 10 ms
4,376 KB
testcase_32 AC 1,291 ms
5,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read n
for((q=w=1;r<w;p[i]=t=i&1?t+1:p[i/2],++i<n||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