Given an array aconsisting ofnintegers, on which you are to performmoperations of two types. 1.Given two integers x,y, replace the number of index xwith number y. That is ax:=y. 2.Given one integer x, print the number of consecutive subsequences of a, whose minimum value equals to ax. It's guaranteed that there are no duplicated value in array aat any moment.
Given an array a consisting of n integers, on which you are to perform m operations of two types. 1.Given two integers x,y, replace the number of index x with number y. That is ax:=y. 2.Given one integer x, print the number of consecutive subsequences of a, whose minimum value equals to ax. It's guaranteed that there are no duplicated value in array a at any moment.
标签: HBC213989The Trip On Abandoned Railway 线段树 数据结构Sequence题解