lavish315's blog

By lavish315, 7 weeks ago, In English

We invite you to participate in CodeChef’s Starters 39, this Wednesday, 18th May, rated for Div 2, 3 & 4 Coders.

Time: 8 PM — 11:00 PM IST

Joining us on the problem setting panel are: - Setters:Lavish lavish315 Gupta,Utkarsh Utkarsh.25dec Gupta, Kanhaiya notsoloud1 Mohan, Yash PoPularPlusPlus Thakker, Shantanu shantanu_p_101_ Pathak, Bruce bWayne Wayne, Hrishikesh hrishik85 Kelker

Announcing Scholarship for CodeChef Certification in Data Structure & Algorithms — More than 100 Indian participants in Divisions 1, 2, and 3 will win scholarships for the CodeChef Certification exam (discounted prices). Scholarship criteria can be found on the respective contest pages.

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Also, if you have some original and engaging problem ideas and are interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

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

»
7 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

As a problem setter, I would encourage everyone to read and think on every problem, as they are very interesting.

All the best!!

»
7 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

As a problem setter, I encourage everyone to participate in the contest and gain high rating!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Reminder: Contest starts in less than 15 minutes.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone check my solution for problem MINBLOCK and tell me what is wrong?

  • »
    »
    7 weeks ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it
    1
    5 4
    1 2 1
    2 3 1
    1 4 1
    4 5 1
    

    Expected: 2 Your: 1

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      If we remove the path from 4 to 5, then the cities 1, 2, 3 and 4 will be infected, which means 4 cities will be infected by removing 1 edge, so isn't 1 a valid answer

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    The given tree is not directed. Since tree is undirected, add two edges instead of one.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      PAIN

      But yes thanks a lot, that was the issue.