CF935F Fafa and Array

Description

Fafa has an array $ A $ of $ n $ positive integers, the function $ f(A) $ is defined as ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF935F/dc9a0a0772798ba9fb8b149f527b509b8571b93b.png). He wants to do $ q $ queries of two types: - $ 1lrx $ — find the maximum possible value of $ f(A) $ , if $ x $ is to be added to one element in the range $ [l,r] $ . You can choose to which element to add $ x $ . - $ 2lrx $ — increase all the elements in the range $ [l,r] $ by value $ x $ . Note that queries of type $ 1 $ don't affect the array elements.

Input Format

N/A

Output Format

N/A