Comments

Is D a DP solution?? if yes then how do i optimise it from O(n^2) complexity

and dru-

I was thinking "geothermal" was the hero who will save them. XD

from this it translates to "their sum"

using shuffle() instead of next_permutation() did pass

cmc so orz

confuse AI that is not participating