CF650D Zip-line

题目描述

\$\$ #### 题目大意: 给定一个长度为$n$的序列以及$m$个操作,每个操作形如“$a_i~b_i$”,表示将序列中第$a_i$个数改为$b_i$。 对于每个操作,求出序列的最长严格上升子序列长度。 **注意:每个操作之间彼此独立。(即每次操作未进行时的序列是输入时的原序列,而不是上一次操作后得到的序列)**

输入格式

输出格式

说明/提示

Consider the first sample. The first assumption actually coincides with the height remembered by Vasya. In the second assumption the heights of the trees are $ (4,2,3,4) $ , in the third one they are $ (1,2,3,3) $ and in the fourth one they are $ (1,2,3,5) $ .