The promised images!
Part 1 - Answer
Part 2 - Answer
Annnnnd, by posting these pictures, I see that the optimization for part 2 is to bound yourself by the points. 10000 is a bit of a red herring.
EDIT: 2018-12-06T11:01:40-08:00 Found some problems with my image processing and fixed them.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The promised images!
Sample Data
Part 1 - Answer
Part 2 - Answer
Answers
Part 1 - Answer
Part 2 - Answer
Annnnnd, by posting these pictures, I see that the optimization for part 2 is to bound yourself by the points. 10000 is a bit of a red herring.
EDIT: 2018-12-06T11:01:40-08:00
Found some problems with my image processing and fixed them.