coordinate compression

closed account (E0p9LyTq)
Can anyone give me some hint as how to solve this problem:

Write some code, post it here.

This is not a homework site, nor one to cheat at codechef challenges.
@hello195,I've never heard of "coordinate compression" and I can't understand the question at all. I don't even understand what Amax(1,i−K),…,Amin(N,i+K) means. codechef sucks.
closed account (D2yh7k9E)
Amax(1,i-k) means element in array A at index max(1,i-k) similarly Amin(N,i+k) means element in array A at index min(n,i+k)
I guess I understand it now. It's pretty convoluted. I have no idea at the moment how to solve it.
Last edited on
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.
Nope.

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.
I had no idea these things had anything to do with scholarships. That's ridiculous.
can someone just explain me the test cases.. I am sort of getting them but a bit confused and above that those max and min also adding to complexity ...just explain me test case
Last edited on
Topic archived. No new replies allowed.