In the future, then transcribing to plain text a statement that uses subscripts to reference a sequence, make the subscript normal text and wrap it in square brackets. For example Amax(1, i−K) would become A[max(1, i−K)].
The more follow-up questions people have to ask to understand what you're asking, the less likely they are to even bother.
Incidentally, if you detect any hostility from us, it's because for the past few months this forum has been bombarded by questions about codechef problems. Not only do these questions typically demand a lot of mental effort to answer helpfully and are off-topic to this forum, but they're usually so specific that if actually answered they're unlikely to help anyone else other than the person who originally asked the question. Consequently, they're perceived as being a waste of our time.
To make matters worse, in the past weeks people have been pouring in looking to cheat in these problems to get scholarships.