Problem: https://codeforces.com/gym/104520/problem/H
I’m sorry I might be really slow, but I’ve tried working through the sample, and I still don’t get what this problem is asking. Initially I thought we’re trying to get a permutation that minimizes the sum when all subsets are multiplied by each other. Using the sample input, I thought it’d look like this (I’m sorry idk how to use Latex here so its in plain text):
((53)+(42)+(-14))+((53)+(42))+((53)+(-14))+((42)+(-14))+(-14)+(42)+(53)
But that equals 76 and not 65.
I’m not sure how this problem is supposed to be interpreted. Can someone please help?