Sponsored
Use these hints if you're stuck. Try solving on your own first.
Maintain separate data structures for each statistic.
Solve with full IDE support and test cases