Thread: September 2021 View Single Post
2021-10-04, 12:57   #18
uau

Jan 2017

7916 Posts

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:
419-7
4-809
with 0+1+1+0+2=4 damage.

So you get 160 damage for those teams, and they can be further improved with one-digit changes:
["4809", "5284", "1065", "1382", "3469"]: 160
["4809", "6284", "1065", "1382", "3469"]: 157
["4809", "6284", "1065", "0382", "3469"]: 155

Improving further would require a two-digit 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.