Weak Test Cases of DISHLIFE

I think test cases of the problem DISHLIFE were weak.

I moved in sequence through islands and got AC…But nothing was mentioned in the statement which means we can move in any order(as told by admin in comment section).


I just used this testcase on atleast 10 AC solutions from the ranklist, all of them gave the output “all” but i think the output should be “some”

3 4
2 1 2
2 2 3
4 1 2 3 4
1 Like

I feel the author himself has commented that.

Oh no, even my solution is wrong then although I was the first person to solve this problem. Now will I not get the prize ??!!!

you will get it, they won’t rejudge solutions after the contest for sure!

Oh Thank God. That’s a releif.

(most probably :stuck_out_tongue: )

We are sorry for weak tests. We didn’t think about that way of understanding the statement and this is why there were no tests against it. More tests will be added in practice. Solutions from the contest won’t be rejudged (current results are final).


Thanks @errichto :diamonds::diamonds:

1 Like

That’s ok…my only purpose was to ask if I was right or not?

Yes,many coders got lucky in this one.
To eliminate the influence sequence of islands on the answer we just have to maintain a frequency array which counts all the ingredients (freq[x]).
Then we move island by island in any order and check if the island contains a unique ingredient i.e. frequency of an ingredient on that island is one (freq[x]==1).Which will state that we definitely have to visit this island.
After counting all such islands(with unique ingredient) we can answer correctly.


1 Like

That’s because almost everyone were using to count the unique elements and were adding elements from previous islands in a straight sequence.

I did not make a single submission due to I did not knew that test case are weak.

I used BIT to solve this problem, took time to solve this, didn’t know test cases were weak, and that was the reason, I was worried, how can so many people get AC in this problem, though islands can be visited in any order.

1 Like

I too used similar concept, used BIT to solve this.

This explains why there were way too many 100-points submissions on this problem.

this problem becomes one of the interesting problems if the test cases are not weak

1 Like

One of week test is as follows-


3 4

2 1 3

2 1 2

2 4 2

In this test chef can skip the 2nd island as he will get
all the required ingredient from island number 1 and 3 .

1 Like

Yes, the problem lacked testing the cases where he can skip some islands. The test cases checked for chronological order, and fell short for cases where he can skip islands if “he can travel in any order”

But another problem i felt was people creating threads on discuss DURING contest. Everyone who accessed those threads came to know of weak test cases and gave that problem a try, knowing his solution is faulty. I mean, instead of solving problem with intent of correct approach, people were like “This has weak test cases so i dont think i need to implement this condition for full points.”

Not only that problem, people reported weak test cases on discuss for other problems too( i personally deleted few comments with link to code, or logics of weak test cases). Please guys, do so in COMMENTS under PROBLEM, not as comments on discuss.

My concern is that it defeated purpose of problem. Even when the thread for simdish was deleted, its title was visible at home page for 1-2 days. So yes, if admins can see it it that such threads are appropriately dealt with, it would be nice.

1 Like

The same reason I was thinking how can so many people have AC in this problem, I solved it using BIT

1 Like