I am getting wrong answer for 1 test cases in this submission:

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

For solving this problem, I am creating a vector of “count” i.e the degree of all vertices. Then ,i create a queue and put in the nodes whose degrees are less than k. While the queue is not empty, i keep on taking out vertices, marking them visited, and subtracting 1 from degree of all its connected vertices. After subtraction, if degree of the vertex falls below k, I push them into queue. Finally, the degree of all the vertices is checked and those with>= k are counted. This is working for all test cases except 1. I cant figure out what is wrong in my code. Please help.