Type: RemoteJudge 1000ms 125MiB

数列找不同

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

现有数列 A1,A2,,ANA_1,A_2,\ldots,A_NQQ 个询问 (Li,Ri)(L_i,R_i),询问 ALi,ALi+1,,ARiA_{L_i} ,A_{L_i+1},\ldots,A_{R_i} 是否互不相同。

输入格式

第一行,两个整数N,QN,Q
第二行,NN 个整数A1,A2,,ANA_1, A_2, \ldots , A_N
接下来 QQ 行,每行两个整数 Li,RiL_i,R_i

输出格式

对每个询问输出一行,YesNo

4 2
1 2 3 2
1 3
2 4
Yes
No

提示

对于 50%50\% 的数据,N,Q103N,Q \le 10^3
对于 100%100\% 的数据,1N,Q1051 \le N,Q \le 10^51AiN1 \le A_i \le N1LiRiN1 \le L_i \le R_i \le N

莫队基础

Not Claimed
Status
Done
Problem
12
Open Since
2024-2-23 8:45
Deadline
2024-4-8 23:59
Extension
0 hour(s)