Strange Operations
Limits: 2 sec., 256 MiB
Zenyk can perform the following operation with his array once a day: choose a natural number \(d\), then for each element of the array increase it by \(d\), decrease by \(d\) or not change.
He understood that he needs to make an array with all elements equal to zero in 30 days, otherwise something bad will happen.
Help him!
Input
The first line contains an integer \(n\) – the size of the array.
The second line contains \(n\) integers \(a_i\) – the elements of the array.
Output
In the first line print an integer \(t\ (t \le 30)\) – the number of days you make all elements equal to zero.
In the next \(t\) lines print a
natural number \(d\ (d \le 10^9)\) and
a string of length \(n\) of characters
+ (increase), - (decrease), 0
(not change) which describes an operation.
If there are multiple correct answers, you can print any of them.
Constraints
\(1 \le n \le 10^5\),
\(1 \le a_i \le 10^9\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 4 4 5 6 1 | 2 1 +0-- 5 ---0 |
Notes
Note that you don’t have to minimize the number of days Zenyk completes the task.
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|