Multiples of Length SOLUTION Codeforces
You are given an exhibit an of n numbers. You need to make all components of an equivalent to zero by doing the accompanying activity precisely multiple times:
Select a fragment, for each number in this section we can add a various of len to it, where len is the length of this portion (included numbers can be unique).
It tends to be demonstrated that it is consistently conceivable to make all components of an equivalent to zero.
The main line contains one number n (1≤n≤100000): the quantity of components of the cluster.
The subsequent line contains n components of a cluster an isolated by spaces: a1,a2,… ,a (−109≤ai≤109).
The yield ought to contain six lines speaking to three tasks.
For every activity, print two lines:
The main line contains two whole numbers l, r (1≤l≤r≤n): the limits of the chose portion.
The subsequent line contains r−l+1 numbers bl,bl+1,… ,br (−1018≤bi≤1018): the numbers to add to al,al+1,… ,ar, individually; bi ought to be separable by r−l+1.
1 3 2 4
– 3 – 6 – 6