Enjoy the match!
CodeChefOpen on judge ↗
There are $N$ football matches, numbered from $1$ to $N$, that you'd like to watch. The $i^{th}$ match has two values, i.e. $S_{i}$ and $R_{i}$, which represent the stadium number, and the number of good ratings of the stadium. You are going to watch these matches exactly once, and you can watch them in any order. The Enjoyment you get from a particular match is the product of its stadium's numbe
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start