Guangdong Province uses “standard point” to evaluate their students in the National Matriculation Examination. The calculating method is as follows: For example, after all the papers of a certain subject are marked, every students got a initial point which is an integer range from 0 to 150. The Examination Center of Guangdong Province sorts all the points from high to low. By computing the percentage of students whose point is lower than this student, the student’s standard point can be calculated. The completely computing process is as below:
Firstly, define a function as below:
__poj_jax_start__\Phi(x)=\int\limits_{-\infty}^x\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}dt=\left\{\begin{array}{lc}0.5+\int\limits_0^x\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}dt&x\ge0\\ 0.5-\int\limits_0^{-x}\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}dt&x<0\end{array}\right.__poj_jax_end__
Secondly, For a give student, assuming that the percentage of students whose point is lower than this student is x (0 <= x < 1), we can get the standard point sp(x) as below:
__poj_jax_start__sp'(x)=500+100\Phi^{-1}(x)__poj_jax_end__
__poj_jax_start__sp(x)=\left\{\begin{array}{lr}100&sp'(x)\le100\\ \lfloor sp'(x)\rfloor&100<sp'(x)\le501\\ \lceil sp'(x)\rceil&501<sp'(x)\le900\\ 900&sp'(x)>900\end{array}\right.__poj_jax_end__
Following the above steps, every percentage can be link to a certain standard point.
As one of the best programmer nowadays, you are invited to write a program to transform the initial points to standard points.