Please read part 1 or this might be confusing
Since part 1, you have replaced the stolen stickers and your daughter has forgiven you. The highway ended up being a full 700km long, so you are happy that you were able to place your last sign far enough out such that the entire highway was to code.
But suddenly... you receive a new job:
The city of Savage now has a second highway leading out from the city center. This highway goes for some distance until it reaches the city of Hogan. You must place distance markers along this highway but they now must be double-sided. Each sign must read the distance to Hogan on one side, and the distance to Savage on the other.
Your sign-printing machine is still down. With a tear in your eye, you walk into your daughter's room and pull the new pack of stickers from her tiny, trembling, hands. You say nothing as you step backwards through the door, and then turn and head off to the factory. You have a job to do.
What is the maximum distance between the city of Savage and the city of Hogan for which you could place double-sided distance marker signs and still satisfy highway code?
Other than signs being double-sided, it's basically the same requirements as last time. 10 of each digit. Signs are at most 20km apart. Leading zeros not required. No lateral-thinking. Computer algorithms are cool (probably necessary for the best answer). Remember the answer is the total distance and not the biggest number on a sign (that should be a different number). Each sign, if you added the front and back together, should be the exact distance between the cities.
Like last time, I'm sure my answer isn't optimal.
Bonus question for the more hardcore computer people: What is the minimum distance where you cannot satisfy highway code?
That's a bonus question because I have no idea. I think it will be less than the other answer. That would be cool.