codeforces 940F 带修改的莫队
F. Machine Learning time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output You come home and fell some unpleasant smell. Where is it coming from? You are given an array a . You have to answer the following queries: You are given two integers l and r . Let c i be the number of occurrences of i in a l : r , where a l : r is the subarray of a from l -th element to r -th inclusive. Find the Mex of { c 0, c 1, ..., c 10 9} You are given two integers p to x . Change a p to x . The Mex of a multiset of numbers is the smallest non-negative