一段序列长度 nnn,两种操作,第一种将 [l,r][l,r][l,r] 区间值全部平方,第二种求 [l,r][l,r][l,r] 区间值的平均数。问用什么数据结构可以使总复杂度降低至 O(nlogn)O(n\log n)O(nlogn) 及以下?怎么实现?玄关