Movie Rating
InterviewTime limit1sMemory limit1024 MB
Given N ratings, remove the L lowest and H highest scores and print the average of the rest.
Problem
A movie appreciation club exists. The club has N members in total, and they meet every week to watch one movie. After watching the movie, each person rates it with an integer greater than or equal to 0 and less than or equal to 100. Once every member has finished rating the movie, the club president computes the final score.
The final rating is the average of the remaining scores after removing the L lowest ratings and the H highest ratings.
Given the ratings left by each member of the movie appreciation club as input, compute the final score.
Input
The first line gives three integers N, L, H. The second line gives the score each member gave the movie, one per line.
Output
Print the final score on the first line. Absolute or relative error up to is allowed.