#Lutece2076. 甲乙丙丁戊己庚辛壬癸
甲乙丙丁戊己庚辛壬癸
Migrated from Lutece 2076 甲乙丙丁戊己庚辛壬癸
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
给出个数,初始值全为,有以下三种操作:
1.将第个数增加.
2.将第个数变成.
3.求第个数到第个数的和。
Input
第一行一个整数,代表数的个数。
第二行一个整数,代表询问的个数。
接下来行,每行第一个整数.
如果,输入,表示将第个数增加.
如果,输入,表示将第个数变成.
如果,输入,表示求第个数到第个数的和。
Output
对于每次号操作,一行输出答案。
Samples
3
5
1 1 1
3 1 3
1 2 4
2 1 2
3 1 2
1
6