SP30827 LASTSHOT - THE LAST SHOT
Description
Tony Stark is on the mission to save the world from Loki's army so he spread N bombs in the enemy region. He spread the bombs in such a way that a bomb can be in range of another bomb i.e say bomb B1 is in range of bomb B2 , when bomb B2 explodes it will trigger bomb B1 and it also get explode but vice-versa might not be true because the bombs are of different of range. As he is running out of energy so he left with one shot To trigger the bomb .Now he ask Jarvis to find most appropriate bomb which he can trigger to make maximum impact.
Impact is basically number of bombs get explode.
Can you help Jarvis to do so?
Input Format
First line contains two integer N and M denoting number of bombs and number of relation between the bombs.
1
1
Next M lines contain two integer A and B denoting bomb B is in range of bomb A.
1
1
Output Format
A single line containing MAXIMUM IMPACT.