You are not logged in. Please login at to post your questions!


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).

asked 17 Apr, 15:11

adhish_kapoor's gravatar image

accept rate: 8%

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).


answered 17 Apr, 15:31

errichto's gravatar image

5★errichto ♦♦
accept rate: 30%

edited 17 Apr, 15:31


Thanks @errichto ♦♦

(17 Apr, 15:34) mathecodician5★

That's only purpose was to ask if I was right or not?

(17 Apr, 15:37) adhish_kapoor3★

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.


answered 17 Apr, 15:40

dusht0814's gravatar image

accept rate: 14%

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

(17 Apr, 16:51) neilit19923★

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.


answered 17 Apr, 16:49

neilit1992's gravatar image

accept rate: 20%

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


answered 17 Apr, 17:16

srihari_v's gravatar image

accept rate: 0%

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.


answered 17 Apr, 17:49

vijju123's gravatar image

accept rate: 17%


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

(17 Apr, 20:28) neilit19923★

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

answered 17 Apr, 15:18

swetankmodi's gravatar image

accept rate: 18%

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 ??!!!

(17 Apr, 15:24) mathecodician5★

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

(17 Apr, 15:25) swetankmodi5★

Oh Thank God. That's a releif.

(17 Apr, 15:26) mathecodician5★

(most probably :P )

(17 Apr, 15:27) swetankmodi5★

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

(17 Apr, 15:43) dusht08144★

I feel the author himself has commented that.


answered 17 Apr, 15:19

ashishsb95's gravatar image

accept rate: 0%

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


answered 17 Apr, 16:52

utkarsh1997's gravatar image

accept rate: 10%

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 .


answered 17 Apr, 17:27

ujjwal451's gravatar image

accept rate: 0%

edited 17 Apr, 17:32

my solution was absolutely correct(not just for weak cases)... what I did is.. I counted frequency of all ingredients ... then looped through all islands and if all the ingredients found on one island had frequency more than one then that island can be skipped and answer is some..


3 4

2 1 2

2 2 3

4 1 2 3 4

so answer to this test case will be some not all..


answered 17 Apr, 21:11

theprk's gravatar image

accept rate: 0%

Answer is hidden as author is suspended. Click here to view.

answered 21 Apr, 16:08

while_1's gravatar image

accept rate: 25%


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


answered 17 Apr, 16:42

shivji's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol



Asked: 17 Apr, 15:11

Seen: 579 times

Last updated: 21 Apr, 16:08