My advent of code submissions.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added past years

Sunglas 16f150e0 c7a74242

+101
+4
2021/day1.apl
··· 1 + v ← 199 200 208 210 200 207 240 269 260 263 2 + solve ← {+/1 1∘⍉⍵∘.<⍵(~,∩)1↑ ⍵} 3 + 4 + solve v
+3
2021/day3.apl
··· 1 + v ←(12 5)⍴ 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 0 2 + solve ← {(2⊥(~*⊣)×2⊥⊣)6<+⌿⍵} 3 + solve v
+3
2022/day1.apl
··· 1 + resp ← ⍎⍕⊃⎕NGET'/home/void/Scripts/apl/2022-AoC/day-1.input' 2 + solution1 ← {1↑(⊂∘⍒⌷⊢)+/¨⍵} 3 + solution1 ← {+/3↑(⊂∘⍒⌷⊢)+/¨⍵}
+35
2022/day2.apl
··· 1 + ⍝ part one 2 + input ← ⊃⎕NGET'/home/void/Scripts/apl/2022-AoC/day-2.input'1 3 + input ← ~∘' '¨input 4 + input ← ('(AZ)|(BX)|(CY)' ⎕R '0 &')¨input 5 + input ← ('(AX)|(BY)|(CZ)' ⎕R '3 &')¨input 6 + input ← ('(AY)|(BZ)|(CX)' ⎕R '6 &')¨input 7 + input ← ('.X' ⎕R '1')¨input 8 + input ← ('.Y' ⎕R '2')¨input 9 + input ← ('.Z' ⎕R '3')¨input 10 + solution ← {+/+/¨⊃¨⌽¨⎕VFI¨⍵} 11 + solution input 12 + 13 + ⍝ part two 14 + 15 + ⍝AX means AZ 16 + ⍝AY means AX 17 + ⍝AZ means AY 18 + ⍝BX means BZ 19 + ⍝BY means BY 20 + ⍝BX means BX 21 + ⍝BZ means BZ 22 + ⍝CX means CY 23 + ⍝CY means CZ 24 + ⍝CZ means CX 25 + 26 + input ← ⊃⎕NGET'/home/void/Scripts/apl/2022-AoC/day-2.input'1 27 + input ← ~∘' '¨input 28 + input ← ('.X' ⎕R '0 &')¨input 29 + input ← ('.Y' ⎕R '3 &')¨input 30 + input ← ('.Z' ⎕R '6 &')¨input 31 + input ← ('(AY)|(BX)|(CZ)' ⎕R '1')¨input 32 + input ← ('(AZ)|(BY)|(CX)' ⎕R '2')¨input 33 + input ← ('(AX)|(BZ)|(CY)' ⎕R '3')¨input 34 + solution ← {+/+/¨⊃¨⌽¨⎕VFI¨⍵} 35 + solution input
+56
2022/day3.apl
··· 1 + a←1 2 + b←2 3 + c←3 4 + d←4 5 + e←5 6 + f←6 7 + g←7 8 + h←8 9 + i←9 10 + j←10 11 + k←11 12 + l←12 13 + m←13 14 + n←14 15 + o←15 16 + p←16 17 + q←17 18 + r←18 19 + s←19 20 + t←20 21 + u←21 22 + v←22 23 + w←23 24 + x←24 25 + y←25 26 + z←26 27 + A←27 28 + B←28 29 + C←29 30 + D←30 31 + E←31 32 + F←32 33 + G←33 34 + H←34 35 + I←35 36 + J←36 37 + K←37 38 + L←38 39 + M←39 40 + N←40 41 + O←41 42 + P←42 43 + Q←43 44 + R←44 45 + S←45 46 + T←46 47 + U←47 48 + V←48 49 + W←49 50 + X←50 51 + Y←51 52 + Z←52 53 + +/⍎¨1↑¨↑(⊣∩⊢)/¨(⊣(↑,⍥⊂↓)¨⍨2÷⍨≢¨)contents 54 + 55 + ⍝ PART TWO 56 + +/⍎¨1↑¨⊃,/(⊣∩⊢)/¨{⍵⊆⍨⊃,/(3⍴1+⊢)¨⍳3÷⍨≢⍵}contents