code :https://ide.codingblocks.com/#/s/29756
ques :https://hack.codingblocks.com/contests/c/471/782
I am getting WA. Please help to correct the mistake
Beautiful Vertices-WA
indegree[i] does not mean number of edges of its parent i guess.
Modify your approach. You want to compare outdegree[i] AND outdegree[parent[i]]
try it out once again and post if you have any issues