Problem Statement:

I am having a problem comprehending this question. It turns out that I have understood the question wrong but I still don’t know what the actual meaning of the question is.

What I have understood is that a number is a summary number if it can be expressed as the sum of some continuous subsequence of the sequence A. It follows that the summary number can’t exceed the sum of A.

Now if we take an example:

A=[2,1,1,2]

All the summary numbers must lie in the set {1,2,3,4,5,6}. Now according to all the combinations of the subsequences I have made there is no way that 5 can be a summary integer. The rest are however summary integers. Hence the output should be 5 summary integers.

According to the accepted submission: https://www.codechef.com/viewsolution/20311966

The number of summary integers for A=[2,1,1,2] is 6 and not 5. I don’t get how.