From e73b11d36e39664c35a6e211665181bf18f23188 Mon Sep 17 00:00:00 2001 From: StarlitGhost <679547+StarlitGhost@users.noreply.github.com> Date: Tue, 26 Dec 2023 23:32:36 +0000 Subject: [PATCH] [2019/10] p2 solved --- .aoc_tiles/tiles/2019/10.png | Bin 7315 -> 9095 bytes 2019/10/script.py | 25 +++++++++++++++++++++++-- README.md | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.aoc_tiles/tiles/2019/10.png b/.aoc_tiles/tiles/2019/10.png index ca880ffb15b5f7e03d65e22be08ab170d22bdb70..08cd0a75f87a2b754f2713f97ce55acc4222eec0 100644 GIT binary patch literal 9095 zcmXAv1ymH@+s8))X+&h{5)df?X{1rQ7U`t~q*J;(my!mTE@`A|0VO1tW|8jhmVWp5 z{?ECyJ7><$nLGEn_j|w3=h;ZGiYz`31r7iJ`0{ceKcT++P{$W6G}Nck`nEm*FsR6X zl+^IZI52RRP}iOl$7XyL47yAb#fXo|%UK07TqiYU_lhqL_V#xF*&fs&XOVUlQ(9jq ztwE#&1@r_O5|=4$S78#DSG_%h2n0geJ^*X`sA_$E{oyp@Y<Xq=0H%_3iG|e zv*42ycl5IaBiub0a=?MEDgnx;ROmZc#%*XuZ1YdyHbvVEzS}o`Zxhrj45L@{KvOdn z{?XKMV6U(f9F5Zs<}Lr`I}u&sl=&v<|!ZL0UNIjb1w zE4+BOloB2K_%t@c@yV&aFGLz97J1HIdqdK#Raye3yduhDLxxwefW`S#;Ro^dEoEwFTs>}N3GOu zNRiW3@C0y4t6L}w(msgVeN(nd7F&TAti<#-YuPeyaNckC1@L(UDq+WDckB_aAv~Cl zBTauY0pB&MWc0bR9=d7}aI2miVR1kQe)8??nMbGZ8yEg4QPY_4;$_7E9MAKuz=)#D z!yMI-y*=xm14DFi$FVrI!ixhSV9#ji-I$qFs8L2#M=FE~A+`?@`T>tGk>oS3E#CEQ z&C40vd_|M;Sd{#nh7+6%SMP-!840|0*(!vFxltJkK{2XjUW5EBu+2<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{` zR+B>ly7uMqpP8HeXFlP_4EoB(`{s6jazOL9YHjY1wV59~@hocy3ph7>hxG{8LmNZi zul5Y6VXi-MKIzR3uJP+EzArqMY!sS(d2Ei)5;FH^1wjHTnPxswO;F@6rJ22{tz990@Z;2sG5D5sP1tp&S%)7@#_on~Y;^XDz)c}LRnwy0m$ZBv8QomU6(V17t}?b~ByRQ0k?_0a-`uiJcT}*npWFAvlT|lcS5qki z-zy0Lfyt4P!@JAlniek2zO|N6?klYk6 m1XLS0+PQTIHZ4AVdP#BjHso1-oDgx?2&gD%%2&ym2mKG-G*H|C diff --git a/2019/10/script.py b/2019/10/script.py index 41953b6..5d30f23 100644 --- a/2019/10/script.py +++ b/2019/10/script.py @@ -9,6 +9,8 @@ def main(): asteroids = list(grid.find_all('#')) most_seen = 0 + best_asteroid = None + best_angles = {} for asteroid in asteroids: angles = defaultdict(list) for other in asteroids: @@ -21,8 +23,27 @@ def main(): if len(angles) > most_seen: most_seen = len(angles) - - print('p1:', most_seen) + best_asteroid = asteroid + best_angles = angles + + print('p1:', most_seen, best_asteroid) + + angles = sorted(best_angles.keys()) + vaporised = 0 + last_vaporised = None + empty = [] + while vaporised != 200: + for angle in angles: + if best_angles[angle]: + last_vaporised = Vec2(best_angles[angle].pop(0)) + vaporised += 1 + if vaporised == 200: + break + if not best_angles[angle]: + empty.append(angle) + for angle in empty: + del best_angles[angle] + print('p2:', last_vaporised.x * 100 + last_vaporised.y, last_vaporised) if __name__ == "__main__": diff --git a/README.md b/README.md index 1070524..498f349 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ My solutions to the yearly Advents of Code

- 2019 - 19 ⭐ + 2019 - 20 ⭐