Dec-03-2020, 06:11 AM
(This post was last modified: Dec-03-2020, 06:15 AM by deanhystad.)
As I said, you need a different algorithm. Doing something 2500 times less often can really save a lot of time.
Even though there are 5000 numbers and around 12.5 million different volumes, the max volume only changed 8 times after my initial guess.
Even though there are 5000 numbers and around 12.5 million different volumes, the max volume only changed 8 times after my initial guess.
Output:Left Right Max Area
1 4999 18446310 <- First guess
2 4999 38399634
2 4998 39681177
2 4995 42214282
3 4995 45715908
7 4995 47420445
72 4994 48146940
73 4983 48392994
84 4982 48431514 <- Max area