coordinate compression

Aug 6, 2018 at 5:07pm
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.
Aug 7, 2018 at 2:31am
@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.
Aug 7, 2018 at 2:51am
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)
Aug 7, 2018 at 3:40am
I guess I understand it now. It's pretty convoluted. I have no idea at the moment how to solve it.
Last edited on Aug 7, 2018 at 3:40am
Aug 7, 2018 at 5:38am
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.
Aug 7, 2018 at 6:10am
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.
Aug 7, 2018 at 6:22am
I had no idea these things had anything to do with scholarships. That's ridiculous.
Aug 11, 2018 at 11:10pm
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 Aug 12, 2018 at 3:57pm
Topic archived. No new replies allowed.