Misha loves to collect sets of colored balls. She saw \(N\) boxes kept in a store. Each box has a set of \(10\) distinct colored balls. The colors are numbered from 1 to 10. Each box has a cost associated with it. She is required to spend the minimum amount of money to buy the boxes such that she has maximum distinct colored balls in the end.
Input format
Output format
Print the minimum amount of money that she has to spend.
Constraints
\(1 \le N \le 10^{4}\)
\(1 \le C_{i} \le 10^{9}\)
\(|S_{i}| = 10\)
If we take the last box, we will get all the 10 distinct colored balls thereby incurring a cost of 9 units. Hence, the answer is 9.
Challenge Name
3 Address Code - On site Hackathon - Finals
3 Address Code - On site Hackathon - Finals