After finding out that of Metropolis' team members have been procrastinating on their work, Patrick has come up with a system to "motivate" them.
Patrick has tied up the people (who are numbered to ) at angular positions of degrees on a circular wheel. As his indentured servant, Jimmy's job is to facilitate the "motivation" by taking orders from him, of the following form:
1 L R D
Spin every person in the range by degrees counter-clockwise. This means that should be added to .2 L R
To make sure that Jimmy has been obeying his orders, he must compute the sum for the current angular positions.
Unfortunately, as an indentured servant, Jimmy was not allowed an education. Please help him answer the queries lest he suffers Patrick's wrath.
Constraints
In all subtasks,
Subtask 1 [30%]
Subtask 2 [70%]
No further constraints.
Input Specification
The first line will contain two space-separated integers, and .
The next line will contain space-separated decimal numbers, in degrees.
The next lines will each contain one order with the format specified above.
Output Specification
For each order of type , output the answer on a new line.
Output your answers to decimal places. Your answers will be considered correct if their absolute or relative errors do not exceed .
Sample Input
5 3
0.00 30.00 60.00 90.00 180.00
2 1 3
1 3 4 45.00
2 2 5
Sample Output
2.366
-1.100
Comments