|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|5 초||256 MB||22||11||8||53.333%|
You and the rest of your team are stuck in a town during the zombie apocalypse of 2020. You all might be infected with the virus and hence you will have to find your way to one of the medical facilities to get a cure before you also become zombies. Because you are scientists you quickly realize that it is safer to try and sneak your way past the zombies than to recklessly start fighting them. Obviously the zombies are everywhere so some streets might take more time to sneak through than others. It is also obvious that by splitting up into smaller groups it is easier to move around undetected.
Furthermore, since these zombies have not mutated to the extent that they actually have eyes in the back of their heads, it might be easy to cross some streets in one direction while hard or impossible to cross them in the other direction.
How many of you can sneak past all the zombies and get to a medical facility in time?
On the first line one positive number: the number of test cases, at most 100. After that per test case:
There are at most two roads – one in each direction – between any pair of locations. The locations are safe enough to wait at for any amount of time and do not have a limit on the number of people that can be there.
Per test case:
one line with a single integer: the largest number of people that can get to a medical facility in time.
2 4 3 8 5 2 2 4 5 1 2 1 3 3 2 1 4 3 1 2 1 1 4 1 3 3 4 1 3 4 3 10 5 2 2 4 5 1 2 1 3 3 2 1 4 3 1 2 1 1 4 1 3 3 4 1 3