Can anyone help me with this problem?
You are given an array with n integers a1, a2, ..., an , a integer K and m queries.
There are two types of query:
give you two integers l and r and ask you to print how many number of integers al, al + 1, ..., ar which equal to K.
give you three integers l, r and v and ask you to add the value of al, al + 1, ..., ar by v.
You should print the answer of the first queries.
Thanks, Sorry for my bad English!