Skip to content

Commit

Permalink
Day 22 solution, very slow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Dec 22, 2018
1 parent 9980a8d commit 51c5f0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions p22.dyalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
⎕IO0
p¨¨'\d+'⎕S'&'¨⎕NGET'p22.txt'1
depth⊃⊃p targetp
el20183|depth+
gi{0 0:0 target:0 0:16807 48271+.× (el g[-0 1])×el g[-1 0]}
g07×target {g[]gi }¨g
t3|el g type
+/,t1+target part 1

m0@(0 0 1)1E63,t last axis: 0=neither, 1=torch, 2=climbing gear
mv{z1+(1e61)(1e6¯1)(1e6,[1]0 1)(1e6,[1]0 ¯1) z[t,¨t]1E6 z} move
cg{z1 07+/ z[t,¨t]1E6 z} change gear
(target,1)cgmvm part 2
2 changes: 2 additions & 0 deletions p22.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
depth: 8112
target: 13,743

0 comments on commit 51c5f0b

Please sign in to comment.