S07E09 - Editorial

Highly poor problem statement, it doesn’t mention that order of the neighbors could be changed. Got 8 W.A. because of this

7 Likes

I was checking through some of the solutions to see my mistake, and found a lot of them to be using similar logic which was sort in descending manner, which wasn’t even necessary…
For the intended problem one could just count minm using an array

1 Like

the order doesn’t matter
if you arrange the array in any way the answer will still be the same

Even though this was unrated for me, which saved me from huge loss. I feel sorry for div 2 guys who were screwed by the contest hosts. I gave nearly 2+ hours wondering why my code is wrong.

U all went through the trouble of writing plots of friends episodes(which I enjoyed) but completely unnecessary and didn’t bother to make the problem statement clear for everyone. This was messed up I wasted so much time in an easy problem.

I don’t know if codechef has a feature like cf alerts because its not uncommon to miss something. Its important to rectify it asap!!
Now that it is over, I don’t expect u would make it unrated which again wouldn’t be fair, but own up to your mistake and apologize.

9 Likes

rip codechef :slight_smile:

6 Likes

The order DOES matter. If you can change it (like sort them, that matters in increasing the maximum). Consider an order with 2 or more “islands”, for example: 0 0 1 1 1 0 0 1 1 0 0 (Here we are not considering the minimum_value * n part). If you start in the first island, going to the second island wouldn’t be possible. So you should just consider one largest island.

2 Likes

The order does matter. In the case if we want to preserve the original order of neighbours as given in the input, then:

  • we need to find the minimum value among all array elements, let’s call it X
  • subtract X from all array elements
  • find the longest streak of consecutive non-zero elements in the resulting array, taking into account the possible wraparound, let’s call it Y
  • the answer is X * N + Y

If we are allowed to change the order of neighbours, then Y is just the total number of remaining non-zero elements rather than the longest streak.

3 Likes

It was clearly mentioned in the explanation of sample test case bro…

1 Like

It was clearly mentioned in the explanation of sample test case bro.

It doesn’t matter if it was mentioned in the explanation, most of us rely on the question statement and no where the words like “permutating” or “reordering” of the array was mentioned, makes the question statement way too ambiguous.
Also the logic we concluded to after reading the statement was giving same answer to the sample test cases which gives us more reason not to read the explanation and move directly to the coding part, after all in such contest your speed matters.
It was a mistake by the authorities and they should at least accept this and apologize :expressionless:.

6 Likes

well that was about the sh*ttiest framed question I have seen in a long long looong freaking time. I don’t know if the people defending the writers saying “reordering was clearly mentioned in the test case explanation” realize that we usually only go to the explanations if there is an aspect of the problem statement itself we haven’t understood, or if the answer our solution creates for one of the given pretests is different than the given sample output. But neither was the case this time, both sample tests yield the same answer without rearranging as they do with sorting, there was no way to know that rearranging was allowed.

It is disheartening to see that the setters were more concerned with the sitcom references than the actual problem statement…

6 Likes

You are right @costheta_z. Noone prefers reading sample explanation if the problem is easy to him/her.

6 Likes

Sometimes problem statement is written incomplete by purpose,to misguided the participants…

On a positive note, take it as a lesson, and from next time see the explanations as well, it will hardly take 1 minute.

Also , I can see that you solve only one problem, that means you had enough time to solve remainin problems… You have great speed…
Better luck next time bro…

Wtf !! Problem statement are written incomplete with purpose lol. Is it a guessing contest ?

No I won’t care reading the sample explanation from next time too. But you please care writing the statements clear if you write any contest in furure.

P.S.: I don’t have a gadget or Doraemon :joy:

7 Likes

I see a true potential of transforming into Nobita in you. Let me boil it down, the purpose of a problem statement is to explain what we are allowed to do to reach the answer, unless of course it is a Codeforces April fool’s contest, but this platform isn’t cf and this clearly isn’t April. I guess find better defences eh!

5 Likes

https://www.codechef.com/viewsolution/54543165

someone please do visit the link and letme know my error

I don’t think Doraemon can provide this particular Nobita with the ability to accept the mistake :joy:

2 Likes

I’ll ignore from now… Do what’s best for you… Anyway I’m not the author of the problem. So why the F I’m explaining…

bro please see my post I am bit confused

Oh I think you’ll find yourself ignorant enough already :joy:, read your other replies btw - belittling people for being stuck at a badly formed problem statement? Not a classy one are ya pal!

2 Likes