~deciduously/aoc2020

7541b95f9cb67e68ca6b3b5256c5a705e9229d62 — Ben Lovy 1 year, 6 months ago b949c81
Day 5
3 files changed, 966 insertions(+), 0 deletions(-)

A 5/day5
A 5/day5.nim
A 5/puzzle
A 5/day5 => 5/day5 +0 -0
A 5/day5.nim => 5/day5.nim +78 -0
@@ 0,0 1,78 @@
import algorithm, sequtils

proc readLines(name: string): seq[string] =
    let f = open(name)
    defer: f.close()

    var ret: seq[string] = @[]

    for line in f.lines:
        ret.add(line)

    ret

type
    Direction = enum
        Front, Back, Left, Right

proc charToDirection(c: char): Direction =
    case c:
        of 'F': Front
        of 'B': Back
        of 'L': Left
        of 'R': Right
        else: raise newException(ValueError, "Unrecognized direction")

proc toDirectionSeq(str: string): seq[Direction] =
    var ret = newSeq[Direction]()
    for c in str:
        try:
            ret.add(charToDirection(c))
        except ValueError:
            echo repr(getCurrentException())
    ret

proc findSeat(str: string): int =
    let dirs = toDirectionSeq(str)

    var minRow, minCol = 0
    var maxRow = 127
    var maxCol = 7

    for dir in dirs:
        case dir:
            of Front:
                maxRow = maxRow - ((maxRow - minRow) div 2 + 1)
            of Back:
                minRow = ((maxRow - minRow) div 2 + 1) + minRow
            of Left:
                maxCol = maxCol - ((maxCol - minCol) div 2 + 1)
            of Right:
                minCol = ((maxCol - minCol) div 2 + 1) + minCol
    
    # Reuslts are now in the max vars
    # Multiply row by 8, add colum
    maxRow * 8 + maxCol


proc getAllIds(): seq[int] =
    let allPasses = readLines("puzzle")
    map(allPasses, proc(s: string): int = findSeat(s))

proc findHighest(allIds: openArray[int]): int =
    allIds.max

proc findMissing(allIds: seq[int]): int =
    var a = allIds
    a.sort()
    for idx, n in a:
        if a[idx + 1] != n + 1: return n + 1

var allIds = getAllIds()
echo findHighest(allIds)
echo findMissing(allIds)

# echo findSeat("FBFBBFFRLR") # (44, 5) - 357
# echo findSeat("BFFFBBFRRR") # (70, 7) - 567
# echo findSeat("FFFBBBFRRR") # (14, 7) - 119
# echo findSeat("BBFF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