We define two sequences and :
mod where is the th prime number.
where denotes the floor function.
Then let be the median of elements through , inclusive. For example, and .
Let . For example, and .
Find . If the sum is not an integer, use to denote a half. Otherwise, use instead.
快速中位数
我们定义两个序列和:
mod ,其中是第个素数。
,其中表示下取整函数。
然后记为从到(含)的中位数。例如,,而。
记。例如,,而。
求。如果这个和值不是整数,用表示,否则用表示。
Gitalking ...