当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6079:Yuno And Claris

题目描述
Yuno failed in a contest, so she was forced to wear JK dress.

Claris AKed in a contest, so she bought some JK dresses for Yuno to wear, each dress has a price.

Because Claris has lots of money, she bought $n$ dresses, and put them in an array $a_1,a_2,...,a_n$.





Because Yuno loves data structure, she invented $2$ kinds of operations :

$1\ l\ r\ x\ y$ : Change all the dresses in $a_l,a_{l+1},...,a_r$ with price $x$ to price $y$.

$2\ l\ r\ k $ : Yuno wants to wear the $k$-th cheapest dress in $a_l,a_{l+1},...,a_r$, please tell her the price of it.
输入解释
The first line of the input contains an integer $T(1\leq T\leq10)$, denoting the number of test cases.

In each test case, there are $2$ integers $n,m(1\leq n,m\leq 100000)$ in the first line, denoting the number of dresses and the number of operations.

In the next line, there are $n$ integers $a_1,a_2,...,a_n(1\leq a_i\leq n)$, denoting the price of each dress.

In the following $m$ lines, each line describes an operation.

If it is a modification, then it is in the format of ''$1\ l\ r\ x\ y$'', where $1\leq l\leq r\leq n$ and $1\leq x,y\leq n$.

If it is a query, then it is in the format of ''$2\ l\ r\ k$'', where $1\leq l\leq r\leq n$ and $1\leq k\leq r-l+1$.
输出解释
For each query, print a single line with an integer, denoting the answer.
输入样例
1
3 3
2 3 3
2 1 3 1
1 1 3 3 1
2 1 3 2
输出样例
2
1
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6079

最后修改于 2020-10-25T23:28:11+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
40000/20000MS(Java/Others) 524288/524288K(Java/Others)