KINGCON - Editorial

In java, you cant really say anything. The TL is set basically using C/C++ because tester and setter both use these most of the times. You did well, congratulations and all the best for future contests.

or maybe in the test cases, there were few complete graphs with huge number of nodes, and those cases were eating up the time.

Is this problem the same as the “minimum vertex cover” problem?

@milhaus : Thanks for your help but @anunay_arunav is right. Removing those test cases do save a TLE even without using fast I/O.
This is sometimes really dissapointing on part of Codechef that the time limit they set is too much strict, even after getting the algorithm correct, one has to waste time on over-optimizing.The dfs approach was already optimized.

exactly same here.
Thats the essence of CodeChef long challenge.
It gives you time to explore new concepts and implement them.
I started with checking the graph by removing each node and marking the critical nodes and as expected was getting TLE.
Articulation points : got to learn a new application of DFS.
Kudos to the problem setter and CodeChef team.

@Tester: It is my attempt for this problem - http://www.codechef.com/viewsolution/2056304 .
can anyone please look at it and tell me why it getting WA (can I know the test cases for which it getting WA)

@tyrant No. Serf Wikipedia.

Your solution is completely wrong and seems to produce wrong output for almost all official test cases.
The simplest test where it fails is:
2 1 1
0 1
You return 1 while the correct answer is 0.

@anton_lunyov How to check whether root is an articulation point or not?

Can anyone please tell me why my submission (below) gives WA.
http://www.codechef.com/viewsolution/4438627

This article explains the algorithm for finding articulation points very well. It has got code too.

Can anyone have a look at my code ? http://p.ip.fi/RMG1
its giving me TLE and i m not able to figure out why.Thanks in advance:)

I tried to solve the prob using Articulation Point concept but , am getting TLE.
https://www.codechef.com/viewsolution/22527020 :->Here is my solution.
Please debug my code

https://www.codechef.com/viewsolution/22661232

Trick to solve this question in python:

  1. use python(cpython 2.7.13)

  2. increase the recursion limit