You have an array a consisting of n positive integers and you have to handle q queries of the following types:
1 i x: change ai to x,
2 l r k: check if the number of occurrences of every positive integer in the subarray al,al+1,…ar is a multiple of k (check the example for better understanding).
想到了一个随机的做法。没交上去。想交互题的 HardVersion 浪费了太多时间。感觉用 K 棵树状数组,然后每棵树都用不同的随机去做应该是对的