#Lutece1259. 昊昊爱运动 II
昊昊爱运动 II
Migrated from Lutece 1259 昊昊爱运动 II
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
昊昊喜欢运动
他天内会参加种运动(每种运动用一个的整数表示)
现在有个操作,操作描述如下
- 昊昊把第天到第天的运动全部换成了()
- 问昊昊第天到第天参加了多少种不同的运动
Input
输入两个数, (, );
输入个数()表示在第i天昊昊做了第类型的运动;
输入一个数();
输入行 每行描述以下两种操作
- 形如
M l r x
,表示昊昊把第天到第天的运动全部换成了() - 形如
Q l r
,表示昊昊想知道他第天到第天参加了多少种不同的运动
Output
对于所有的Q操作,每一行输出一个数 表示昊昊在第天到第天一共做了多少种活动
Samples
5 3
1 2 3 2 3
4
Q 1 4
Q 2 4
M 5 5 2
Q 1 5
3
2
3
Resources
咦。。。