xyzCoder0123's blog

By xyzCoder0123, history, 2 months ago, In English

While solving C2. Game on Tree (Medium), I noticed a possible missing test case, since my solution received AC despite being incorrect.

I submitted the following solution and it got AC: 363223808 But later I realized the solution is actually wrong.

Consider this test case:

6 1
1 2
2 3
3 4
1 5
5 6
1

My code prints: Hermione

But the correct answer should be: Ron

This input fully satisfies the constraints, yet this case is not caught by the current tests.

I believe this is a valid case that’s currently missing from the tests. It would be great if the setters could take a look and consider adding such cases or clarifying the intended logic, so that incorrect solutions don’t pass by mistake.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it