for array b n integer extreme value array minimum number time possibly zero follow operation perform b nondecrease Select index 1 le le b b current length b replace b_i element x y x y positive integer x y b_i this way array b change operation perform modified array for example b 2 4 3 index 2 gets select possible array operation 2 underline1 underline3 3 2 underline2 underline2 3 2 underline3 underline1 3 and consequently array single operation nondecrease 2 4 3 rightarrow 2 underline2 underline2 3its easy array positive integer nondecrease wayyoukn0wwho array n integer help find sum extreme value nonempty subarray modulo 998244353 if subarray appear multiple time extreme value count number time appearsan array d subarray array c d obtain c deletion possibly zero element begin possibly zero element end