码迷,mamicode.com
首页 > 其他好文 > 详细

CodeForces 1098E. Fedya the Potter

时间:2019-02-08 01:02:24      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:The   codeforce   time   $1   mes   floor   序列   下标   for   

题目简述:给定长度为$n \leq 5\times 10^4$的序列$a_1, a_2, \dots, a_n$。将$\gcd(a_l, a_{l+1}, \dots, a_r) (1 \leq l \leq r \leq n) $从小到大排序后得到长度为$n(n+1)/2$的序列$b$。将$b_l+b_{l+1}+\dots+b_r (1 \leq l \leq r \leq n(n+1)/2)$从小到大排序后得到序列$c$。求$c$的中位数。

注:若$c$的下标从$1$开始,则$c$的中位数定义为其第$\lfloor (k+1)/2 \rfloor$个元素。

CodeForces 1098E. Fedya the Potter

标签:The   codeforce   time   $1   mes   floor   序列   下标   for   

原文地址:https://www.cnblogs.com/TinyWong/p/10355779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!