#P11171. CF1746F Kazaee
CF1746F Kazaee
CF1746F Kazaee
题目描述
You have an array consisting of positive integers and you have to handle queries of the following types:
- : change to ,
- : check if the number of occurrences of every positive integer in the subarray is a multiple of (check the example for better understanding).
输入格式
The first line of the input contains two integers and ( ), the length of and the number of queries.
Next line contains integers ( ) — the elements of .
Each of the next lines describes a query. It has one of the following forms.
- , ( , ), or
- , ( , ).
输出格式
For each query of the second type, if answer of the query is yes, print "YES", otherwise print "NO".
输入输出样例 #1
输入 #1
10 8
1234 2 3 3 2 1 1 2 3 4
2 1 6 2
1 1 1
2 1 6 2
2 1 9 2
1 10 5
2 1 9 3
1 3 5
2 3 10 2
输出 #1
NO
YES
NO
YES
YES
说明/提示
In the first query, requested subarray is , and it's obvious that the number of occurrence of isn't divisible by . So the answer is "NO".
In the third query, requested subarray is , and it can be seen that the number of occurrence of every integer in this sub array is divisible by . So the answer is "YES".
In the sixth query, requested subarray is , and it can be seen that the number of occurrence of every integer in this sub array is divisible by . So the answer is "YES".
相关
在下列比赛中: