SP30906 ADAUNIQ - Ada and Unique Vegetable

Description

Ada the Ladybug is cultivating vegetables. She has a long furrow full of different kinds of it and she wants to know the number of unique vegetables on a segment of the furrow. As the cultivation is a dynamic process, a kind (on a single position) might become another kind during this process. Given furrow and a few updates, can you answer questions asking about number of unique kinds of vegetable on a segment?

Input Format

The first line contains **1 , length of furrow and number of queries.** Next line contains **N** integers **0 , the kind of **i $ ^{th} $** vegetable** Each of following **Q** lines contains one of the following kinds of query: _1 I V_: The vegetable on index **0 , will be changed to kind 0** _2 L R_: **0 , the index of left/right bound of segment for which you want to know the number of unique kinds.**

Output Format

For each query of second kind, print the number of unique kinds of vegetable. 温馨提示:下标从 $0$ 开始。