프로그램 명: ncpc_statisticians(special judge)
제한시간: 1 초
//sj가 아직....

Statisticians like to create a lot of statistics. One simple measure is the mean value: the sum of all values divided by the number of values. Another is the median: the middle among all values when they have been sorted. If there are an even number of values, the mean of the two middle values will form the median.

These kinds of measures can be used for example to describe the population in a country or even some parts of the population in the country. Anne Jensen, Maria Virtanen, Jan Hansen, Erik Johansson and Jn rsson want to find a statistical measurement of how many statisticians there are in the Nordic countries.

To be more precise, they want to fnd out how many statisticians there are per unit area. As the population in the Nordic countries are well spread out they will try the new measurement MAD, Median of All Densities. First put a square grid on the map. Then draw a rectangle aligned with the grid and calculate the density of statisticians in that area, i.e. the mean number of statisticians per area unit. After that, repeat the procedure until all possible rectangles have been covered. Finally the MAD is the median of all statistician densities.

입력

출력

The output contains of one line with the MAD. The number should be printed in number of statisticians per square and contain three decimals. The absolute error must be < 10^-3.

입출력 예

입력

2 3
2 4
6 1 4
2 7 1

출력

3.667

입력

4 2
1 8
6 5
2 5
2 9
7 13

출력

5.250
출처:ncpc/2010/Problem I

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]