https://codeforces.com/problemset/problem/1539/D
in thel officila editorial why its said that// If all prices are 2, then we will not make the answer worse by buying the item with max bibi.//
because 50 ercent discount can be appied if the cp is 2