+/AoC

advent of code

git clone https://git.julia.blue/+/AoC

Joseph RyanStart 2023!c203ef0

master
203 B10 linesraw
1#!/usr/bin/env jconsole
2load '../util.ijs'
3in =: ;:;._2 in
4d =: {."1>{."1 in
5num =: ".>{:"1 in
6depths =: +/\num*(-1*d='u')+d='d'
7dist =: num*d='f'
8ans (+/dist)*{:depths
9ans (+/dist)*+/dist*depths
10exit''