Time Limit: 1s
Memory Limit: 128MB
There are n Killers in a city.Each killer want to kill a killer(maybe a suicide) and if A want to kill B , there will not be another killer want to kill B. Killers kill their aim by turn and we ensure that in the end ,there will be at most one killer still alive. If there is one killer not be killed in the end, he will be the king of killer.Can you tell me the number of killer who can be the king of killer?
The first line is an integer T indicating the number of test cases.
Next T block, each block is a test case.
First line of each block is a integer N ( 1 <= N <= 100000 )
Followed by N lines, each line is two integers A B , indicating that A will kill B.
The number of killer who can be the king of killer.
2 2 1 2 2 1 1 1 1