how to solve problems like this div2 should I just start throwing random stuff for half an hour like, try sort based on first, try sort based on second , try sort based on max, try sort based on min, try sort based on sum , try sort based on max-min
is this the optimal strategy? I'm not joking.