Regarding external contest PRADNYA WILCARD ROUND 2019

External contests have been a part of Codechef for long now and Codechef should monitor the questions and other things before giving them rights to host on their platform. I was using the comments section to ask my doubts, but none of the organizers were active enough to reply. What made this contest even bad was the question The Segment Game had weak test cases, or maybe a wrong setter’s code. I asked them about it in the comments section but they simply ignored it, having messed up the Buggy Remote already, they preferred to stay silent on this one.

Codechef should focus on quality rather than quantity and having a small team of 2/3 will help to have better contests in the future. The test case on which a ac

(,strivers) [The Segment Game ]( fails is 
2 2 
2 2 
1 5  

Its a request to Codechef to monitor such contests so that we have a better time.

Very Weak Test Cases ;(


Buggy Remote Problem is also incorrect.
For test case


0 1 0 0 0 0 0 0 0 0

9 0

An accepted answer of my friend gives 1 where actually the answer is 2.

Such contests cause wastage of time. Please look into this.

1 Like

Can u please tell the logic for Buggy Remote.

Pre-store all the numbers which can be reached directly using the remote.
Now for every D in the query, Binary search for a number lesser than D and a number more than D.
Now there are three possibilities of reaching D from C.

  1. You go directly to D from C using +
    or - buttons, that will cost you
  2. You go to the lower
    number using keypad and one fire
    button then from lower to D using +
  3. You go to the higher
    number using keypad and one fire
    button and then from higher to D
    using - button.

The minimum cost of the above three will be the answer.

1 Like

How to solve problem of problem curator. This is really a nice problem.

I think “each segment is distinguishable” has something to do with it, it could mean two things first that two similar segments like (2,2) and (2,2) are distinguishable or l and r are so set that no pair of (l,r) repeats itself and hence all segments are distinguishable.Now if we consider the second case, as each segment is distinguishable let us pick the segment with lowest r, so this segment can only lie inside segments which have equal r but all l values corresponding to these same r value will be different so if we are able to pick up the segment with highest l then you would never find another segment that would overlap or lie inside, hence Akash always wins. This is the most logical explanation I could find, I was expecting a TLE on my solution but when I got a runtime as low as 0.13, I reread the question and came to this conclusion as there were solutions with runtime as low as 0.04 too. So if this is correct then that means no case of (2,2) and (2,2) would ever exist and your friends solution is right.

alt text

But the author mentions that this can be possible that it is present twice.

How to solve queries and why codes submitted during contest can not be viewed ?

For the test case I gave, some of my friend’s ac code gives the output as “Shivam” , whereas if Akash chooses 1,5, then Shivam will choose 2,2 and then Akash chooses 2,2. Hence Akash will win!

Now they update their test cases after the contest without any announcement.

@striver_79 Thank you for the explanation.

they also ignored my comments…lol, though i didn’t expect reply from them… :P:P:P