#P4939. Agent2
Agent2
Description
As an ENLIGHTENED operations commander, he naturally does not want to see this happen. So he secretly obtained the event schedule of those Agents who often “gu gu gu”, for the next days, and asked you to help organize it. During the organizing process, the ENLIGHTENED operations commander gave you commands. The commands are as follows.
- Input , which means that from day to day , one Agent will “gu gu gu”.
- Input , which means that the ENLIGHTENED operations commander asks you, based on the current information, how many Agents will “gu gu gu” on day .
As someone who is also a “never-cancel bird”, you also want to punish those who often “gu gu gu”. Therefore, please help the ENLIGHTENED operations commander finish the organizing, and each time he asks, output the correct answer.
Input Format
The first line contains two integers . The next lines each contain one command. The command format is given in the Description.
Output Format
For each query operation, output the answer to the query. Separate answers by newlines.
5 5
0 1 2
0 1 5
1 1
0 3 5
1 5
2
2
Hint
For of the testdata, .
For of the testdata, .
For of the testdata, .
For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号