Discussion About Min Cost Permutation

This is Discussion thread about Min Cost Permutation

the question should be max cost permutation according to the Test Cases given

Any idea how to solve it using bitmasking?