-
Notifications
You must be signed in to change notification settings - Fork 0
/
year20-fast.7bh
101 lines (87 loc) · 1.21 KB
/
year20-fast.7bh
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
-- 7 Billion Humans (2215) --
-- 20: Reverse Line --
-- INSTRUCTIONS: "Reverse the line of data cubes and place the result
-- back on the floor, in the same location, between the two holes."
-- AVAILABLE COMMANDS: step, pickUp, drop, if, jump, end, comment
-- SIZE: 64 commands (challenge 9, shortest known 9)
-- BEST AVERAGE RUNTIME: 5 seconds (challenge 11, fastest known 4)
-- Westernmost worker
if sw != datacube:
pickup s
step ne
step e
step e
step e
step e
step se
step se
drop
end
endif
-- Easternmost worker
if se != datacube:
pickup s
step sw
step w
step w
step w
step w
step w
step w
drop
end
endif
-- 2nd westernmost worker
if sw != datacube:
pickup s
step ne
step e
step e
step se
step se
drop
end
endif
-- 2nd easternmost worker
if se != datacube:
pickup s
step sw
step w
step w
step w
step w
drop
end
endif
-- 3rd westernmost worker
if sw != datacube:
pickup s
step ne
step se
step se
drop
end
endif
-- 3rd easternmost worker
if se != datacube:
step s
pickup c
step sw
step w
step nw
drop
end
endif
-- Center-west worker
if sw != datacube:
pickup s
step se
drop
end
endif
-- Center-east worker
step s
pickup c
step w
drop
-- vim: set autoindent noexpandtab