Day 11: Cosmic Expansion [AOC2023 Python]

Опубликовано: 11 Декабрь 2023
на канале: 0xdf
142
9

For Advent of Code 2023 Day 11, I get a map of galaxies in space. I need to get the manhattan distance between each pair and sum that. The twist is that any empty row or empty column counts for more than one space. In part 1, it's double. In part 2, it's a millions times!

Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/11

☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf

[00:00] Part 1 description
[01:10] Input
[02:07] Getting Galaxies
[03:46] Getting empty rows and cols
[05:58] Looping over galaxy pairs
[06:56] get_dist function
[08:32] Testing get_dist
[10:44] Solving ex and part 1
[11:03] Part 2 description
[11:16] Updating scale factor
[11:36] Solve part 2

#adventofcode #python


Смотрите видео Day 11: Cosmic Expansion [AOC2023 Python] онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь 0xdf 11 Декабрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 142 раз и оно понравилось 9 людям.