Need help on the question QABC of Snackdown

help
for
problem
qabc

#1

I need help on how to start the operation on any location of array. Just a hint would work.


#2

You are not supposed to ask any sort of questions/hints about a problem from an on-going contest