Advent of Code

For discussions about adventofcode.com
Dec 25, 2021 05:11
i spent 44s on p2
reading is hard
Dec 22, 2021 05:34
@emanresuA number of steps
Dec 22, 2021 05:31
my p2 solution (pypy) used 4 gb but finished successfully
it's O(n^4) time and O(n^3) memory
Dec 21, 2021 06:07
swap p1 and p2 in 19 and 25 lines
Dec 21, 2021 05:28
@TheFifthMarshal 1110^3 = 1367631000
Dec 19, 2021 07:21
i checked all 48 rotations: 6 permutations * (2 signs)^3
Dec 17, 2021 05:13
"1) 2237 ***************** btnlq"
saved
Dec 14, 2021 05:26
@UnrelatedString or both...
Dec 14, 2021 05:23
the first and the last symbols in my polymer template are equal, lost 2 minutes on this
Dec 8, 2021 07:10
The left part contains any digit exactly once, so it always contains a specific segment the same number of times ("a" segment - 8 times, ..., "g" segment - 7 times).
Sum of these numbers of segments turns out to be unique value for each digit ("0" - "abcefg" - 8+6+8+4+9+7 = 42, ..., "9" - 45).
Dec 8, 2021 06:48
Dec 7, 2021 06:26
O(n) solution for part 2: Try it online!
Dec 7, 2021 05:21
v
Dec 5, 2021 05:33
open(0) doesn't need import
https://tio.run/##K6gsycjPM/7/Py2/SCFbITNPIb8gNU/DQNOKi7OgKDOvRCMHyM3W1Pz/PyM1JyefKz0/PyWpMpUrJz8HAA
Dec 3, 2021 05:19
@hyper-neutrino int(str(...)[1::3], 2) lol