Under construction

Still being built. Things may change

Movie Rating

Interview

Time limit1sMemory limit1024 MB

Summary
Given N ratings, remove the L lowest and H highest scores and print the average of the rest.
Level

Easy3 of 10

Topics
Sorting, Array, Math
Solved
No attempts yet

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 10−910^{-9} is allowed.

Constraints

  • 1≤N≤501 \le N \le 50
  • 0≤L,H≤500 \le L, H \le 50
  • L+H<NL+H < N

Examples5

  1. Example 1

    Input
    5 0 0
    70 99 96 0 30
    
    Expected output
    59.0
    
  2. Example 2

    Input
    3 1 1
    91 90 50
    
    Expected output
    90.0
    
  3. Example 3

    Input
    8 2 3
    23 23 23 23 23 23 23 23
    
    Expected output
    23
    
  4. Example 4

    Input
    10 1 4
    31 52 20 86 47 76 82 27 42 29
    
    Expected output
    35.2
    
  5. Example 5

    Input
    10 2 2
    1 1 0 0 1 1 0 1 0 2
    
    Expected output
    0.6666666666666666