From a99d739a9d8a59cbe216738017ce4cf33cfff177 Mon Sep 17 00:00:00 2001 From: Akumatic Date: Sat, 5 Dec 2020 11:22:13 +0100 Subject: [PATCH] 2020 Day 05 --- 2020/05/README.md | 55 +++ 2020/05/code.py | 33 ++ 2020/05/input.txt | 782 +++++++++++++++++++++++++++++++++++++++++++ 2020/05/solution.txt | 2 + 4 files changed, 872 insertions(+) create mode 100644 2020/05/README.md create mode 100644 2020/05/code.py create mode 100644 2020/05/input.txt create mode 100644 2020/05/solution.txt diff --git a/2020/05/README.md b/2020/05/README.md new file mode 100644 index 0000000..64efdd3 --- /dev/null +++ b/2020/05/README.md @@ -0,0 +1,55 @@ +# 2020 Day 5: Binary Boarding +Copyright (c) Eric Wastl +#### [Direct Link](https://adventofcode.com/2020/day/5) + +## Part 1 + +You board your plane only to discover a new problem: you dropped your boarding pass! You aren't sure which seat is yours, and all of the flight attendants are busy with the flood of people that suddenly made it through passport control. + +You write a quick program to use your phone's camera to scan all of the nearby boarding passes (your puzzle input); perhaps you can find your seat through process of elimination. + +Instead of [zones or groups](https://www.youtube.com/watch?v=oAHbLRjF0vo), this airline uses **binary space partitioning** to seat people. A seat might be specified like `FBFBBFFRLR`, where `F` means "front", `B` means "back", `L` means "left", and `R` means "right". + +The first 7 characters will either be `F` or `B`; these specify exactly one of the **128 rows** on the plane (numbered `0` through `127`). Each letter tells you which half of a region the given seat is in. Start with the whole list of rows; the first letter indicates whether the seat is in the **front** (`0` through `63`) or the **back** (`64` through `127`). The next letter indicates which half of that region the seat is in, and so on until you're left with exactly one row. + +For example, consider just the first seven characters of `FBFBBFFRLR`: + +- Start by considering the whole range, rows `0` through `127`. +- `F` means to take the **lower half**, keeping rows `0` through `63`. +- `B` means to take the **upper half**, keeping rows `32` through `63`. +- `F` means to take the **lower half**, keeping rows `32` through `47`. +- `B` means to take the **upper half**, keeping rows `40` through `47`. +- `B` keeps rows `44` through `47`. +- `F` keeps rows `44` through `45`. +- The final `F` keeps the lower of the two, **row `44`**. + +The last three characters will be either `L` or `R`; these specify exactly one of the **8 columns** of seats on the plane (numbered `0` through `7`). The same process as above proceeds again, this time with only three steps. `L` means to keep the **lower half**, while `R` means to keep the **upper half**. + +For example, consider just the last 3 characters of `FBFBBFFRLR`: + +- Start by considering the whole range, columns `0` through `7`. +- `R` means to take the **upper half**, keeping columns `4` through `7`. +- `L` means to take the **lower half**, keeping columns `4` through `5`. +- The final `R` keeps the upper of the two, **column `5`**. + +So, decoding `FBFBBFFRLR` reveals that it is the seat at **row `44`, column `5`**. + +Every seat also has a unique **seat ID**: multiply the row by 8, then add the column. In this example, the seat has ID `44 * 8 + 5 = 357`. + +Here are some other boarding passes: + +- `BFFFBBFRRR`: row `70`, column `7`, seat ID `567`. +- `FFFBBBFRRR`: row `14`, column `7`, seat ID `119`. +- `BBFFBBFRLL`: row `102`, column `4`, seat ID `820`. + +As a sanity check, look through your list of boarding passes. **What is the highest seat ID on a boarding pass?** + +## Part 2 + +**Ding!** The "fasten seat belt" signs have turned on. Time to find your seat. + +It's a completely full flight, so your seat should be the only missing boarding pass in your list. However, there's a catch: some of the seats at the very front and back of the plane don't exist on this aircraft, so they'll be missing from your list as well. + +Your seat wasn't at the very front or back, though; the seats with IDs +1 and -1 from yours will be in your list. + +**What is the ID of your seat?** \ No newline at end of file diff --git a/2020/05/code.py b/2020/05/code.py new file mode 100644 index 0000000..5a46a71 --- /dev/null +++ b/2020/05/code.py @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: MIT +# Copyright (c) 2020 Akumatic +# +# https://adventofcode.com/2020/day/5 + +def readFile() -> list: + with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f: + return [line[:-1] for line in f.readlines()] + +def parse(seat) -> tuple: + return sum([2**(6-i) for i in range(7) if seat[i] in ("B")]), \ + sum([2**(9-i) for i in range(7, 10) if seat[i] in ("R")]) + +def part1(seat_ids: list) -> int: + return max(seat_ids) + +def part2(seat_ids: list) -> int: + for i in range(8, 1015): # front and back row skipped + if i not in seat_ids and (i - 1) in seat_ids and (i + 1) in seat_ids: + return i + +def test(): + assert parse("FBFBBFFRLR") == (44,5) + assert parse("BFFFBBFRRR") == (70,7) + assert parse("FFFBBBFRRR") == (14,7) + assert parse("BBFFBBFRLL") == (102,4) + +if __name__ == "__main__": + test() + seats = [parse(val) for val in readFile()] + seat_ids = [seat[0]*8 + seat[1] for seat in seats] + print(f"Part 1: {part1(seat_ids)}") + print(f"Part 2: {part2(seat_ids)}") \ No newline at end of file diff --git a/2020/05/input.txt b/2020/05/input.txt new file mode 100644 index 0000000..0761d83 --- /dev/null +++ b/2020/05/input.txt @@ -0,0 +1,782 @@ +FBBBFBBLRR +BFFFBBFLRR +BFBFBBFLLR +BBFFFFBLLR +FBBFBBFRLL +BBFFFFBRLL +FBBFBFFLLR +BFFBBBFRRL +FFBFBFFRLR +FBFFFFBLLL +FBFFFFFLRL +FFFBFBBRLR +FFBFFFFLLL +BFBBBFFLLL +FFBBBFBRLR +BFFBFBFLLL +FBFBFFFLLL +BBFFBBBRRL +FBFFBFBLLL +BFFBFBFRRL +FBFBFFFRLR +BFBBBFBRLL +FFBBFBFLRL +FBBFFBFRRR +BFBBBBBLRL +FFBFBFBLRL +FFBFFFFLRL +BFBFBFBRRR +FBBBBBBRRR +BFBFFBBRLL +BBFFBFBLLL +BFBFBBFRLL +FBFBBBBRLR +BFFBBFBRRL +BFBBBFBRRR +FBBBFBBLRL +BBFFBBBLRL +FFBBFFFRRR +FBFFBFFLLL +FBFFBBFRLL +FBBBFBFRLL +BFFBBFFLRL +FFFBFBBRRR +BFBBBBFRLR +FBFBFBBRRL +BFFFFFFRRL +BFBBBBFRRL +FBFBBFFRRL +FBFFBFFRLR +FBBFFBBRRR +FBFBBFFRRR +FFFBBFFRLR +BBFFBFBRRL +FBBBBBFRRR +BFBBBBBRLL +BFFBFFBLRL +FBBBFFBRRR +BFFFBBFRLR +FFBFBBBRLL +BFBBBFFRLL +BFBBFBFRRR +FBFBFBBLLL +BBFBFBBRLL +FBBF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FBFBFBFLRL +FBBFFFBLRR +BFBFFBBRRL +FFBFBFFLLR +FFBBFFBLLR +FFFBBBFRRR +BFFBFBBRRR +FFFBBBBLRL +FBBBBBBLRR +FBBBFBFLRR +FFBBBBFRRR +FFBFFBFLLL +BBFFBBFRLR +FBFFFFFRRR +FBBBFFFLRL +BFFBFFBRLR +FBFFFBFRRL +BBFFFFFLLL +FFBBFBFLLL +BFFBFFBRLL +FFBBFFBLLL +BBFFFBFLLR +FBBFBFBLLL +BFFFFFBRRR +BFBFBBBLRL +FBBFFBBRLL +BFFBFFFRLL +BFFBFFFLRR +BFFBBBFRLL +FBFBBFFLLL +FBFBFBFRRL +BFBBFBBLLR +FBFBBBBLRL +BFFFBFBRLR +FFFBFBFRRL +BBFBBFFLLR +FBBFBFFLRL +FFBBBBBLRR +FBBBBFBRLL +BBFBFBFRLR +BFBBBBBLLL +FBBBFBBLLR +FFFBBFFRLL +FFFBFBBRLL +FFBFFBFLLR +BBFFFFFRRR +BBFFBFFLRL +FBFFFFBRRR +BFBFFFBLRL +BBFFBFBLRR +FFBBBFBRRL +FBFFBFBLRL +FBBFBFBRLR +BFBFBFFRRL +BFFFBFBRRL +BFFFBFFRLR +BBFBFBFLRL +FBBFBFFRRL +BFBBFBBRRL +BFFFFBFLLL +FBBFBBBLRR +BFBFFFFLLL +FFBBBBBLRL +BFBFFBBLLR +FBFBFBFLLR +FFBFFFBRLR +FBBFFFFRRR diff --git a/2020/05/solution.txt b/2020/05/solution.txt new file mode 100644 index 0000000..e60a88f --- /dev/null +++ b/2020/05/solution.txt @@ -0,0 +1,2 @@ +Part 1: 866 +Part 2: 583 \ No newline at end of file