人力资源机器19-24满星攻略

冲鸭!!!

第19层-倒计时

新指令

bump+:从指定的瓷砖上+1,并将结果写回地板,结果也会放回到你的手上
bump-:从指定的瓷砖上-1,并将结果写回地板,结果也会放回到你的手上

挑战体积

思路是,输入之后立马输出一下,然后看看刚才的输出(output之后手上就没有数字了,再copyfrom一下)是否为0(并跳转).接着按正、负进行不同的增减运算,输出,输出之后再看看刚才的输出是否为0(并跳转或循环)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
INBOX
COPYTO 0
b:
c:
OUTBOX
COPYFROM 0
JUMPZ a
JUMPN d
BUMPDN 0
JUMP b
d:
BUMPUP 0
JUMP c


DEFINE COMMENT 0
eJyzYGBgiFN/rrtPunTKTcFL14Bchv9GMSEshn+y2gze9x8y/DNjl0nX4g0Wk1eutQxZlW0luELOPrP7
vl1IzSLbtqI0m9dxGdZLIjdYRATuMgnxA+nnKS005Sk96Taj4Jo/iL+ren5YR9n3dJWcmKZPaVo921Jf
9/xIWdEFkjtV6lzQW3KpakLxj6nni08u8i5V2gISD+086bZuurUNiL20maPEq/dP1sz5W1K7l2xIAomZ
TuUpL5nKMCd/+r2Nr2ccPbtmRsTt/OlLHq+b/uPjxmk7P22ZuvV9e5/7eYZRMApGAV4AADJSY8s;


挑战速度

根据上面的思路,我们只需要省略输出前的那步copyfrom就可以提高效率。做法是:利用bump±的特性,当我们进行bump±之后我们的手上会得到一个数字,这就解决了我们在上面的代码中output之后因为手上没有数从而没法输出的问题。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 6
a:
INBOX
JUMPZ e
COPYTO 0
JUMPN c
COMMENT 2
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d3dPsJsfNaYI+dUmpUTtSXse9zXifOLXQPre3hKPEsfJ55/9Ks6n/Kw/OcazsWuxcEbD8
Uc7s9RvS7220T7q30SlRdiNTouQ6kLlLmxkc9kxicNg2pckRxO/qbXPp6lWLntQl2SDQfW7pmZ7UbSBx
8QVNjlcXTPadvDCg8uqCz5MmL2SYE7Lw3NKJi2avv7yw7NDTTWWHQOrCF+y13bCuzi5v/UGHT2tvBYHE
3JfZ52ZubCsCsY2PmlluOcKQZ3Bs78yPR+1PFh01PwwStzjs7VF0tM4u9dQW8/lnjMz8L20xb7x+1Pnz
ndnBWg8yY58+NEtf+cA+9/C1S1Uzz81udNu3oothFIwCKgAAGUTA6g;


第20层-乘法研讨会

// 新注释!

现在可以在地砖上画注释了

挑战体积

朴素算法。三块地转,一块a,一块b,一块res存储结果。
反复给res+=a,直到b为0为止。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
INBOX
COPYTO 0
COPYTO 2
INBOX
COPYTO 1
b:
JUMPZ d
BUMPDN 1
JUMPZ c
COPYFROM 2
ADD 0
COPYTO 2
JUMP b
c:
COPYFROM 2
d:
OUTBOX
JUMP a


DEFINE COMMENT 0
eJwzZmBgqJS9ZLpbZk08q2TdLCCXodh8sfYl89K09xY7M8ycdmY88UjIk/PmKLH2Ea29463X3+phPWOq
0+O5c+0fz+2wjpkJ0sNjFWGl5/rZ7I53rhGIf74+QXNu1SXTpeURVtmlEVYgMe/GNhee0pDUuLzSNBC/
osY95nrN0cLgunvNm+p+TAWJvew9qlM0TVYdxH7TsCY+oXVNfOT8yb5Hl032BYkZTH+feHGad9m3KfNn
h069tH/6FNFD0pM/H1jfLbiCYRSMglFAMgAAb1VO8w;

DEFINE LABEL 0
eJwTZGBg2FTHEmVWWxdqVyUZxFLxPSCsUDJocppgclnqn6yy1OdFn9IuVaVlK7b9z23r/F7Q1vmnKrfc
uzEklbOJoTWhdfIkhkEIMuNiZgamZy4KKzRamVxhv2l7B8fOZ7N8dg+0u0bBKBhsAACmdyia;

DEFINE LABEL 1
eJwTY2BgkGs76ZbQeitzVWPiZu9GpdMgGijWvb1DtDa3x7tszyTvstCpl6reTd/btHj2tSnyc88tlZ8r
u/HZrP693DPND1+cNvvYy962cxEdJy8sajl5wbvR+QzDKBgFo2BIAADMgi4l;

DEFINE LABEL 2
eJzTY2BgmGF6NmGr2d7jIubmh7eanez2s+QoYbGdnr7LQTA5weuaP1AJA1+g5PS/YfNnC0XPn82UaD1j
R8rkSd2Z95pXZInWrsjqr+jOfF40Oe1P1q/k6ek+sTszzCO1SmPCqxr+hq3oYgvJXLQ82H5TTHjunq+R
l/afiBM9FJgueqg6X2tXcVHiZpD5Z3oS8iI6lhQktHqXObeI1jq3zG5kbG3rvNMWMEF5gvvC+RONVkpP
zt2j3bth35sGn90MdARrLi/WNrjU5nLz3PT0ptNrlsw/I7ii/sbz7TtvPd9+7faSraZ3ZDeC1D3ZdzZh
+cn3idduWwdvfb7Fj55uHAWjgFwAAOZ5cdo;


挑战速度

只用了102步,小于官方要求的108步。
这个优化便是,针对a*b运算,取a和b中较小的那个来进行循环;如果a、b中有一个为0,则直接输出9号砖上的0.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 6
a:
b:
c:
d:
INBOX
COPYTO 0
JUMPZ j
INBOX
JUMPZ k
COPYTO 1
COPYTO 2
SUB 0
JUMPN g
COMMENT 1
e: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L/sxgrLy0orYqYu3W2sdbljav2c0wCkbBKBjUAAB5+zEq;

DEFINE LABEL 1
eJzjZ2BgCCs86XYrv60oLfvPMSCXQT7vUhVnmXeZZU1XqWaTVs/DFo5FCq0hq1KbYzasr0/dJlmw88ir
zL3HGUbBKBgFQx4AAOOuGbQ;

DEFINE LABEL 2
eJyzYGBgOGqwM+OUXmHyDM33iVrK1lmFCjzlm+VvNXyWf9//VpFlvry67MbJ2it2nNLL3OliGLNhl0nT
3KU2TfmPbD+nPLEpTdO07q/ItrKescKaZb6infM8oJEM6wPWxBv7M+SV+k2v2+5rNrXc9/3eb74rdnzz
tZ6xxU+2eX2AdVZqyDV/hbA+rznhfV4CMYoRJ+LeJzIlMuTZJwVU1iXtnPYrWXYjyKy9VStinCvuhfaW
XPO/XhDil5irl/gox7lAJl+wSqRIsmF/5Youy5rPkyxr7Gfvr/Re0lE2eeX54skrpxaeW8owCkbBKMAL
ANZiYLI;


第21层-以零结尾的求和

挑战体积

首先初始化一下res存放结果的地砖,然后每次取一个输入加到res上去,直到取出0为止。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
COPYFROM 5
COPYTO 0
b:
INBOX
JUMPZ c
ADD 0
COPYTO 0
JUMP b
c:
COPYFROM 0
OUTBOX
JUMP a


DEFINE COMMENT 0
eJwzYmBgcDRydvLTZcjLUZLd+Fne+hhQiCHPsik/z7Jw4hvLPzOW2rgvnGvPuzTCkXfpQc8/M775bpjw
0V+tc33Aveb1AYJVH/29yyx8WQqbPA/mgfTK5wn6qORoxb3K3JtdksZTbpUiWAUS5ykNqbmVr9a5OtNs
qns871LZcMl1IPHdySzzy1L7l2VmtZ0D8XMb1KKndN4LBbEdK/X6K2py+3x7ZjcqzYGY83nq654tU3dO
Wzf92mqjaZOvM0/4cZhhFIyCUUAWAABW0EwD;

DEFINE LABEL 0
eJyzZGBg6BS3Du4Uf5+4TGJDZYrkpf1KUqlngcIM86QvVUnJHi1UVxFM5tedHxZmtsUPJJ5sGzChwnHy
pFVukydF+Or1dwWldjwInd14IyK3/EL02YTC6Mm+m6P0vKQiTrqlhrS5BAS0uWS4T/b1dvse0GEtmCxi
npD33ZSjZIbpveb3FoUTrzuWrr7jbX54efDJCyFRry/aJM8+tiJLaxfIrtT+swnL+7ricnsyYyM6MmOv
1yTksVSI1rJUzG48VMHQWlHzusesNmDClc6uxXw9gitye0pXn+nZsE+sU/TQ8SbRQ8F1G/YxjIJRMApw
AgD9zmBf;


挑战速度

程序一共是71步。这里直接把5号地砖上的0作为初始值,然后对于第一组数据就直接加到5号地砖上就可以,直到拿到数字0,直接输出。接下来处理后面的数据,如果为0则直接输出这个数列,然后立刻开始处理下一组数据;不然就将此输入覆盖5号地砖上的值进行初始化,然后回到最开始的处理方法上去(后面的数据直接加到5号地砖上就可以)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
b:
INBOX
JUMPZ c
ADD 5
COPYTO 5
JUMP b
c:
COPYFROM 5
d:
OUTBOX
INBOX
JUMPZ d
COPYTO 5
JUMP a


DEFINE COMMENT 0
eJxTZ2BguCz8x+ac6HfLbXIbTOapvzeW0fhsNk+9zWW10vPOQoXC/UAlDM+tP5ul2WTuBLGLpl2S+zzV
2gbEfjddz/juXD1jENujb7H2yV7JIBD7fX1EoHT7/LAj/Y8iAhctiQSJWUzJTfg9aXL170l6/SC+QLds
87WO550g9ry5txrypzfN3TL15KJVjc+3/6lasYNhFIyCUUBzAABo+z3d;


第22层-斐波那契参观者

AK代码

17行/132步的好成绩。
三块地转:a、b、n。n为输入,a为当前的斐波那契值,b为a之后的下一个斐波那契值。
首先是将9号地砖上的0加一,给后面的初始化用。
然后拿9号地砖上的1初始化 a 和 b = 1
将输入放到 n 上
接着开始循环:

  1. 输出地砖a上的值
  2. 计算(a+b)并拷贝到b上
  3. (a+b)-a,并拷贝a上,这一步相当于把b的旧值搬运到了a上
  4. a-n,判断此时是否应该跳出循环。
  5. 从第1步开始循环。

如果跳出了循环,则从9号地砖复制一下,拿去初始化a和b。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
BUMPUP 9
a:
COPYTO 0
COPYTO 1
INBOX
COPYTO 2
b:
c:
COPYFROM 0
OUTBOX
COPYFROM 0
ADD 1
COPYTO 1
SUB 0
COPYTO 0
SUB 2
JUMPN c
JUMPZ b
COPYFROM 9
JUMP a


DEFINE COMMENT 0
eJwzYWBgWK8S5hmlcjJ1vVJuH5DLwGJyTzvS/prmeo9jqiw+O5VYfM6ps7gn+US63MxkcQ5oj3T6u5HF
UWwHSK39qscaX5bfSPiy/NzEnGUy20Fif/Z0OhkeNHHoORbn2HI61sPoXIz/t3OsId/ORcYePBWRcuLo
mrS/J+uLL5xd3jTl3IUuo3NV/X9PKk8xPFgxDaQ/8OH6CM9n6yMuPmeJrnulm8z2hjFT5219cd9bjfrd
L5WnJDz5utzp3tzN325/2rr65qetxi8+bc14U7hz7oc5uxhGwSgYBSQBAIIYY28;

DEFINE LABEL 0
eJyTYWBgiCzL848sS/JhLnB0Yck2dVyXbOrIEunrHhmS5RcZVB/MEvAwmyUgonN9QOXEdaFPVrOEf12/
LpJx87oExs0sKT83sGTdWLEud/mcdcX85ZGlK2KZS4C46FVuZGHftMii5XMii1fPZS49vJi55s1ahlEw
CkbBoAIAO3Yubg;

DEFINE LABEL 1
eJwTZWBgWJe3Ui4yL9AjMtumaV12+InInJqLkTm1kyLzfhUyFzzMZq58mL2ugassskW7LqItonNd+6Tp
zB03Vqxr/7huXYv1wXXN3kcj62ourivvvcqcN/EawygYBaNgyAAA4FMn1A;

DEFINE LABEL 2
eJyTYGBgYAkydGAJepfHEhDRyRKweX6kn/Ph9X61kyKDPN1YQmWsWSL/G7PEfDdkSf9uuC73v3FkEbsZ
c4mABXOpgs26Mk+3yModiZFVpRMiqxg3A41jWFf1c8O6Ku+jzFUF5xhGwSgYBYMaAAAtriJj;

DEFINE LABEL 9
eJwTZ2BgWJArq96dedKNP8M9hj/DKCUw/U9WYLpZXV5GakdeBm9fXN7OtTylPrsla6qOtjbvPR7R4bN7
Upf9puV916Yc6d9Qmdq/M2N99/ywTXVHdZaWy6pvLbTXmFHQpMUwCkbBKBj0AADTKyiA;


第23层-最小的数字

朴素做法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
INBOX
COPYTO 0
b:
c:
INBOX
JUMPZ e
COPYTO 1
SUB 0
JUMPN d
JUMP c
d:
COPYFROM 1
COPYTO 0
JUMP b
e:
COPYFROM 0
OUTBOX
JUMP a


DEFINE COMMENT 0
eJxTZGBgWGv5R1XEvMr6lsn7xEeGsxs36LxfBhRm4LESlKtwVHRk9PIuSw0xWikV8Xw7SDzMTLR2goV3
GY+VVmmF4/T0Wm+16FI/liiQXOjUS6ZnenKNats+mzm3VFn3Npx0m1obExJdfTahoXJJQUPlvWa7qtQO
s1q9fs4myenfpgiuYBgFo2AUDBgAAFWHMH8;

DEFINE LABEL 0
eJwzZ2Bg4NddUsCve69ZR+/cUh090UN5uvab8nQLJz4ytM/da3wr85bJrcxL5k35PFYbKjusGVrv2/1Z
b2fPsVPRTmsXi+3z7c+tp6/psG7rvG9nlHLdUS1a0EUt2tonJNXY/3O1sf/sxo/+im18geeW8gW+vhgQ
kHoWaCWDTub7xE9pl6quph6cczV17/HJaa8vBqY7nwHJzSjokjyanSkBYvc2vE/Ua3BuF6w3WilYX3VU
sD5kVW/D5EkJrSGp1u2PIko7vwcc6VeLlp68MyN0an9F0bTXPUXTBFeETt17nGEUjIJRQBAAALdrXts;

DEFINE LABEL 1
eJzzYGBgMNEWtSjTirCSVw9JXax6srtN5dqUNhWW+ZnKt9ZlKs8+Nluj7dwGndcXjxqcvOBolHp2r/G9
E7dMNuybYbpk6wzT98seGT6eCzSGQUv8T1aK5PT0PsVbmYE6OzNe6f3JcjT6kwWSK3AJSfV2S+3wdjs4
p9Wjf6+3G8dOPdc/6/Vcf0zNcBetXeS5pMDaZ3o6X2BIamrIn6zd4YptlRHzZ1dGvL4YE/76on3YvRP2
Yfab/oatWdIXU9UgnsoS9SntfeKKrM/Ve/PWLJlR0L93a+Hk6yJFP25dKgq4CrLzTYNRypsGvX7B+v//
QXzG1unpVzqNUiymhKRyz1xS4Dp7Q+XduSe7Z8+LmTl73tFtiXM27OufXnXUYsre49bte4+b1VYdZRgF
o2CYAwDttYbC;


AK代码

一个地砖:res,用于保存输出结果
对于串的第一个输入:直接放到res上
对于接下来的输入:

  1. 如果为0,则输出res,并开始对下一轮串的处理
  2. 与res比大小,更新res的值或是继续接收输入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- HUMAN RESOURCE MACHINE PROGRAM --

a:
INBOX
COPYTO 0
b:
c:
INBOX
JUMPZ e
SUB 0
JUMPN d
JUMP b
d:
ADD 0
COPYTO 0
JUMP c
e:
COPYFROM 0
OUTBOX
JUMP a


DEFINE LABEL 0
eJxTY2BgMJczszSXk5wOZDJ8lXOP8VGSDLqrzuMpYm5mCRJbarOh8r7dpao3rhwljF4JeR/93ycGBDyK
SPBicFDzuGd33mWFa4NdV1yH9dHC59apHQ12ARO+OF2bsj6gcCJI//viLX4y+a/dPbPaXMpS21zEU91j
Jqe9T2zOuZVpWXC08HvB52rLgoj6sxkrun4l6/W3xev1M4yCUTAK6AIAD607yg;


第24层-模运算模块

AK代码

53步11行
两块地砖a、b
反复计算a-b-b-b-b-b-b-b-b-b-b-b,直到第一次为负。
输出时再加一下b,然后输出就可以。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
-- HUMAN RESOURCE MACHINE PROGRAM --

COMMENT 0
a:
INBOX
COPYTO 0
INBOX
COPYTO 1
COPYFROM 0
b:
SUB 1
JUMPN c
JUMP b
c:
ADD 1
OUTBOX
JUMP a


DEFINE COMMENT 0
eJzLZWBg8BVT1DonapQyRVivf6LI+34Gaa2er3JaPYUKuX1aygfnrFS+tjpT+da6z/IrdrhK/jl2Wqzu
xESRH4eBWhl6xNSi1ymmRoHYW802mOhZ5hotstUzvunwx0bS0d31jn1MSIKdVlyajV6iifma+DzL13EJ
dhuSAlxYCjndBauYPRNamzy3TGb2PLeU0/3WOjn7x1s2mattB5nXFn9LhTWBpRDE/pQ22fdF1mRfEHte
WJuLbHiXu2y4bOiD0NwEkBij16WqKh/RWpeEa7UqOTFNILF9SZINdUknF7kk5O7hiF+zGyTmHzN7/b2w
mA0gtnjh/E3ihYX7Z+dbH1uX0X/ldrjWi+XBua+K/F+/AMlrzBL0WTPjXvOaGbfWfZjGcQEkxr5M1L9t
2aOItmVq21mXHzwFEntzvMnx3TEOt+2HA7xB/GvnY0KunVeMuHluRYzGSeeCgmNdpdaHvMtAcrJnjxbe
PpvZffss72UQ/8WD98YdbzaY/PmgZwziN17vKuV/ZZ/b/fpPFoif+DigMuZp6ZSw56lP5j1Z8OD1/abT
DKNgFFARAAA21q4T;

DEFINE LABEL 0
eJyTYGBgOFvC4xmXV2e3ImuHlUnad8vdyXttueJC/EKitOKkIhjyYsJnN0pE/ph6OappLm/syUU2yYIr
NqQLrlDJ2TvzUtGlKueKFTGHKu6FHi2XDe0oy4zlKT2Y113Ksci5YslWhlEwCkbBoAYA2Iso1Q;

DEFINE LABEL 1
eJwTYWBgOBb/2uBYfKV1Z9w1/6iIH1Nvh6ttnxlRduhCdEIrb2xX6bH4LakMSYXJrzILk1NyvqfH5TkX
zM4PqZEs0Ou/m+e9RDF3/qbVmWrbeWNf72IYBaNgFAwpAAB2QCSr;

DEFINE LABEL 2
eJyzY2BgWKn8KOKt4r3QGpn5YafFnkcn8e3MeMd5suQjh2jtJo5bDblc1jOyuFnmp/KeW3pZePqanbK3
1n2Wl1y3TlF0tZZy/7J56pndMzQDKi9pJ4RP1l4TH6Nxq+GBmvWMeep1swJ1nOcBrWCQiig0nRfG46kb
yFFy0ZnjAkhsumOX+3XHa/4BLvdCe13vhXq7zQ7mduPxBMnNC3NfGBO+YkdUxIodEpGPt4hGBSy/Fum+
cF4Yy3yQ/JuG75a5DWrR32sY5pjV1p14X/9janbj/JbUZtlmiY75Lee61/Se7N0y+Vjf3pls/RFrPfqU
tkzq0tub0LrloF6D+WGGUTAKRgEYAABmMGjO;


作者

勇敢梧桐树

发布于

2022-12-31

更新于

2023-01-04

许可协议

评论

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×