2654. Median

单点时限: 2.0 sec

内存限制: 256 MB

This problem is easy. You are giving $N$ numbers, and you are going to find the Median of them. Median is the number that separates the higher half the numbers given from the lower half.


There are some cases. Process to the end of file

Each case give as $N,A,X_0,B,M$ separates by a single space, and you are going to generate the numbers as follow:

$X_i = (X_{i-1} \cdot A + B) \bmod M$

$N$ would be less than $1~000~000$. Both $A, B, M, X_i$ would be a positive number less than $40000$.


Output the number which is the median of the sequence in one line. If $N$ is even,you should output the second of the two medians.


5 73 5 97 43

34 人解决,53 人已尝试。

64 份提交通过,共有 280 份提交。

5.1 EMB 奖励。

创建: 11 年,1 月前.

修改: 2 年,11 月前.

最后提交: 2 月前.

来源: N/A