SP4828 ZSEQ - ZSequence
Description
You will be given a sequence A containing **N** positive integers, **a $ _{1} $** , **a $ _{2} $** , ..., **a $ _{N} $** .
Let **S(i, j)** = **a $ _{i} $** + **a $ _{i + 1} $** + ... + **a $ _{j} $** , if i
Input Format
The first line of the standard input contains two space-separated integers **N** (2
Output Format
On the first line of the standard ouput you should print space-separated **K** - 1 indices of the solution as already explained. If such solution does not exist, you should print only one integer -1.
**Note:**
Memory limit is 16MBs.