2024年4月3日水曜日

Human Resource Machine Year41

お気に入りのゲームHuman Resource Machine(Android版)の
自力で見つけた解答例を書き残して置くことにします。
今回は最後のYear41です。

Year 41  並べ替えよ
初手

1:
copyfrom 24
copyto 20
2:
inbox
jump if zero 3
copyto [20]
bump+ 20
jump 2
3:
bump- 20
jump if zero 4
copyto 21
copyto 22
5:
bump- 22
jump if negative 6
jump 7
6:
bump- 21
jump if zero 8
jump 9
8:
10:
4:
copyfrom [20]
outbox
bump- 20
jump if negative 1
jump 10
9:
copyto 22
bump- 22
7:
copyfrom [21]
sub [22]
jump if negative 11
copyfrom [21]
copyto 23
copyfrom [22]
copyto [21]
copyfrom 23
copyto [22]
11:
jump 5

サイズ目標  33/34

1:
copyfrom 24
copyto 20
2:
inbox
jump if zero 3
copyto [20]
bump+ 20
jump 2
3:
bump- 20
jump if zero 4
copyto 21
copyto 22
5:
6:
bump- 22
jump if negative 7
jump 8
7:
bump- 21
jump if zero 9
copyto 22
bump- 22
8:
copyfrom [21]
sub [22]
jump if negative 6
copyfrom [21]
copyto 23
copyfrom [22]
copyto [21]
copyfrom 23
copyto [22]
jump 5
9:
4:
10:
copyfrom [20]
outbox
bump- 20
jump if negative 1
jump 10

スマートな解答1 (サイズ:40/34, スピード:773/714)

1:
2:
copyfrom 24
copyto 20
3:
inbox
jump if zero 4
copyto [20]
bump+ 20
jump 3
4:
bump- 20
jump if zero 5
copyto 21
copyto 22
copyto 19
6:
7:
bump- 22
jump if negative 8
jump 9
8:
copyfrom [21]
copyto 23
copyfrom [19]
copyto [21]
copyfrom 23
copyto [19]
bump- 21
copyto 19
jump if zero 10
copyto 22
bump- 22
9:
copyfrom [19]
sub [22]
jump if negative 7
copyfrom 22
copyto 19
jump 6
5:
copyfrom 0
outbox
jump 2
10:
11:
copyfrom [20]
outbox
bump- 20
jump if negative 1
jump 11

スマートな解答2 (サイズ:48/34, スピード:716/714)

copyfrom 24
copyto 18
bump+ 18
bump+ 18
1:
2:
inbox
copyto 0
inbox
jump if zero 3
copyto 1
copyfrom 18
copyto 20
4:
inbox
jump if zero 5
copyto [20]
bump+ 20
jump 4
5:
bump- 20
copyto 21
copyto 22
copyto 19
6:
7:
bump- 22
jump if negative 8
9:
copyfrom [19]
sub [22]
jump if negative 7
copyfrom 22
copyto 19
jump 6
8:
copyfrom [21]
copyto 23
copyfrom [19]
copyto [21]
copyfrom 23
copyto [19]
bump- 21
copyto 19
jump if zero 10
copyto 22
bump- 22
jump 9
10:
11:
copyfrom [20]
outbox
bump- 20
jump if negative 1
jump 11
3:
copyfrom 0
outbox
jump 2

スピード目標  711/714

copyfrom 24
copyto 18
bump+ 18
bump+ 18
bump+ 18
1:
2:
3:
inbox
copyto 0
inbox
jump if zero 4
copyto 1
inbox
jump if zero 5
copyto 2
copyfrom 18
copyto 20
6:
inbox
jump if zero 7
copyto [20]
bump+ 20
jump 6
7:
bump- 20
copyto 21
copyto 22
copyto 19
8:
9:
bump- 22
jump if negative 10
11:
copyfrom [19]
sub [22]
jump if negative 9
copyfrom 22
copyto 19
jump 8
10:
copyfrom [21]
copyto 23
copyfrom [19]
copyto [21]
copyfrom 23
copyto [19]
bump- 21
copyto 19
jump if zero 12
copyto 22
bump- 22
jump 11
12:
13:
copyfrom [20]
outbox
bump- 20
jump if negative 2
jump 13
4:
copyfrom 0
outbox
jump 3
5:
copyfrom 0
sub 1
jump if negative 14
copyfrom 1
outbox
copyfrom 0
15:
outbox
jump 1
14:
copyfrom 0
outbox
copyfrom 1
jump 15

0 件のコメント:

コメントを投稿