-
-
Save voidhawk42/d381347d45a5f4450222d8d212a388d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x _ z←↓⍉↑' '(≠⊆⊢)¨⊃⎕nget'7.txt'1 | |
a←{0::0 ⋄ ⍎⍵}¨x ⋄ s←⍬ | |
t←{s⊢←s(¯1↓s)(s,⊂⍵)⊃⍨' .'⍳⊃⍵}¨z | |
+/r/⍨1e5≥r←a+.×t∘.(⊃⍷⍨)∪t ⍝ part 1 | |
⌊/r/⍨r≥⊃r-4e7 ⍝ part 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment