November LUNCHTIME Discussion

I am creating this thread so that we can post queries about any question RELATED to November Lunchtime Contest.

This time’s lunchtime had disgusting problem statements, I suggest setters to at least learn to write the problem statements more simply,without adding useless and cumbersome misinterpretations and twists to the question.

16 Likes

can anybody tell the full solution of PLANT and both full and partial of SRVR

1 Like

Can someone explain approach of PRFCTN using stacks

Can you please tell me the solution of Perfection(PRFCTN)

1 Like

In the problem PIBRO the constraints mentioned clearly indicates an O(N) or O(NlogN) solution should work in the worst case, but my solution1 (in python), which is O(N^2) solution passes all the subtasks, the test cases gives an unfair advantage to the contestants with a brute-force solution as well.

3 Likes

disjoint set union

Div 2 Lunchtime was easy this time or is it just me?:thinking:

1 Like

How did you use dsu?

@druh

What was your approach ?

Cannot figure out a test case that would give WA for APARTS problem solution. Need help: https://www.codechef.com/viewsolution/28020368

Someone help me out with planting trees. I got partial solution ( TLE ). With O(n) complexity.
https://www.codechef.com/viewsolution/28015723
I guess it’s due to the sort. Does it become O(n^2).

@admin please note that the pizza or broccoli question has very weak test cases(gets ac in O(N^2)). You should run additional test cases on that question and regenerate the ranklist it is very unfair for ppl to write a plain brute force for such a simple question and get it correct.

In line 38, j < n - 1 should have been j < m - 1.

1 Like

Can you show a brute force solution that passed all tests?

@si14 many but the best would be you write one and see it pass yourself. You can also look at @sbh69840 solution which passed.
Here is another : https://www.codechef.com/viewsolution/28016275

1 Like

Can anybody tell the test case in which my solution of compress the list (CMPRSS) problem fails (Link below), I have got the AC verdict with different approach but want to know where this one fails, it passes all the test case assumed by me. Thanks in advance :slight_smile:

Link: https://www.codechef.com/viewsolution/28020580

Well yes even my solution passed easily when the worst case is easily O(n^2)
https://www.codechef.com/viewsolution/28017156

1 Like

Can anybody tell the test case in which my solution of compress the list (CMPRSS) problem fails. Thanks in advance :smiley:

Link: https://www.codechef.com/viewsolution/28017220

Can anybody tell the test case in which my solution of Planting Trees (DEADEND) problem fails. Thanks in advance :smiley:

Link: https://www.codechef.com/viewsolution/28018155