SEGDEV-Editorial

I didn’t get the proof. How can we ensure that n-1, n-2 length subarray doesn’t divide the sum and there always exists such number ? Can anyone elaborate a bit?

Thanks for noticing. I have updated the proof. :man_astronaut:

1 Like

What should be noticed in this…?
I didn’t get it.
Can you pls explain?

why cant we use 2,3,2,3,2,3,2… like this sequence?
suppose we select given subarray and assume it would consist p 2’s and q 3’s then sum (2p+3q)%(p+q) != 1 wouldnt this always be true for q >0 ?

I’m sorry if this is a rudimentary question.

In the text of the explanation, in line 16 ,
" In this N−1 possible numbers, there are also N−2
numbers which we can take such that subarray whose end points are 2 and N will not divisible by N−1 "
how did you know that there are N-2 numbers in {X + 1, …, X + N-1} where sum_A [2 ~ N] is not divisible by N-1?

all of them should be distinct, no worries i did the same mistake<<|| ||>>

for case 2 why should numerator be even?

Consider any number X. We don’t know whether it is even or odd. But we know that X/2 is an integer. Now if X/2 is an integer 2 must divide X (if 2 doesn’t divide X result would be a number of form _.5) thus, we can say that X is an even number.