SP1470 SEQ2 - Another Sequence Problem

Description

You are to write a program to perform some operations on a given sequence.These operations are listed below: ``` --------------------------------------------------------------------------------------------- | Name | Input format | function | --------------------------------------------------------------------------------------------- | Modify | MAKE-SAME i t c| Modify all the t numbers from the ith number(included) to | | | | number c. | --------------------------------------------------------------------------------------------- | Insert | INSERT i t s | Insert t numbers after the ith number.s is a sequence of t | | | | numbers which should be inserted one-to-one.If i=0,you | | | | should insert s in the first of the sequence. | --------------------------------------------------------------------------------------------- | Delete | DELETE i t | Delete t numbers after the ith number(included). | --------------------------------------------------------------------------------------------- | Reverse | REVERSE i t | Reverse t numbers after the ith number(included). | --------------------------------------------------------------------------------------------- | Get sum | GET-SUM i t | Output the sum of t numbers after the ith number(included).| --------------------------------------------------------------------------------------------- | Get maximum | MAX-SUM | Output the maximum partial sum in the sequence now. | | partial sum | | | --------------------------------------------------------------------------------------------- ``` See the example.

Input Format

The very first line contains a single integer T(T

Output Format

For each Get sum and Get maximum partial sum operation,you should write the answer to the output,one per line.