Quote:
Originally Posted by Dieter
The published bonus solution agrees with my submitted solution (174).

The teams in the example solution are ["4809", "5284", "1065", "1382", "3469"]. But the given match strings are not optimal for those teams. I get 160 damage for them. Looking at the given matches, there's for example this (at position 39 in the strings):
4197
5284
with 1+1+1+3=6 damage. But using team 4809 instead of 5284, you get:
4197
4809
with 0+1+1+0+2=4 damage.
So you get 160 damage for those teams, and they can be further improved with onedigit changes:
["4809", "5284", "1065", "1382", "3469"]: 160
["4809", "6284", "1065", "1382", "3469"]: 157
["4809", "6284", "1065", "0382", "3469"]: 155
Improving further would require a twodigit change:
["4809", "6284", "1065", "0382", "0459"]: 154
Improving from that requires changing 4 digits:
["4709", "5280", "1065", "0382", "0759"]: 152
["4709", "5280", "9061", "0382", "0154"]: 151
Further improvements would require 5 or more changes, I didn't check for those.