4213: One-Way Roads
Time Limit: 1 Sec Memory Limit: 128 MB Special JudgeSubmit: 133 Solved: 45
Description
In the ACM kingdom, there are N cities connected by M two-way roads. These cities are connected, i.e., one can reach from any city X to any other city Y by going through some of these roads. One day, the government wishes to assign for each road a direction, such that one can still reach from any city to any other. You are asked to determine whether this task is possible.
Input
The first line of input contains T(0 ≤ T ≤ 100), the number of test cases. The first line of each test case consists of two