I mean iam cyan and can't solve a 1300 rated problem i wanted to go with greedy approach but for some reason I'm getting WA , also i saw A LOT of submission failing with the same test case that my code fail with so can someone tell what iam doing wrong problem if just too easy and still cant solve it , sub:288972222 , problem : 2022B - Kar Salesman
3
1 1 5
You just need to satisfy two conditions.
First condition: There should be at least $$$max(a_i)$$$ for $$$1<=i<=n$$$ as a customer can not buy more than 1 car from the same model.
Second condition: There should be enough customers such that all cars can be sold.