D - Median of Medians Time limit : 2sec / Memory limit : 1024MB Score : 700 pointsProblem Statement We will define the median of a sequence b of length M, as follows: Let b' be the sequence obtained by sorting b in non-decreasing order. Then, the…
原文链接https://www.cnblogs.com/zhouzhendong/p/ARC101D.html 题目传送门 - ARC101D 题意 给定一个序列 A . 定义一个序列 A 的中位数为:给 A 排序,得到的第 $\left\lfloor\cfrac{i}{2}\right\rfloor+1$ 项的值. 序列 B 由序列 A 的所有连续子序列的中位数构成. 问序列 B 的中位数是多少. 序列中可能出现重复的数,$|A| \leq 10^5$ . 题解 注意这里说的“中位数”是题意里…
3110: [Zjoi2013]K大数查询 Time Limit: 20 Sec Memory Limit: 512 MBSubmit: 6265 Solved: 2060[Submit][Status][Discuss] Description 有N个位置,M个操作.操作有两种,每次操作如果是1 a b c的形式表示在第a个位置到第b个位置,每个位置加入一个数c如果是2 a b c形式,表示询问从第a个位置到第b个位置,第C大的数是多少. Input 第一行N,M接下来M行,每行形如1 a…
原题链接 http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1809 Description Bobo has a balanced parenthesis sequence P=p1 p2…pn of length n and q questions. The i-th question is whether P remains balanced after pai and pbi swapped. Note that questions ar…