Advent of Code - Day 24

2018
advent-of-code
#1

Note: This topic is to talk about Day 24 of the Advent of Code.

For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.

1 Like

#2

It was a relief that today’s puzzle was relatively straight-forward. Only a lot of details to keep straight. Then in part 2 there could be a stalemate, where neither the immune system nor the infection could win.

Here is my solution for day 24.

It runs in 3 seconds.

2 Likes

#3

Here’s mine, which takes about 7 seconds.

1 Like

#4

Although both can be checked with the same condition, I’m wondering if everybody had the same case since there can be two:

  1. there’s a point when the target selection process ends up picking immune groups for both sides,
  2. none of the groups is powerful enough to deal any damage (effective power < hit points).
0 Likes