Description Bob has traveled to byteland, he find the N cities in byteland formed a tree structure, a tree structure is very special structure, there is exactly one path connecting each pair of nodes, and a tree with N nodes has N - 1 edges. As a tra…
How far away ? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5492 Accepted Submission(s): 2090 Problem Description There are n houses in the village and some bidirectional roads connecting…
Description In the ``Four Color Map Theorem" was proven with the assistance of a computer. This theorem states that every map can be colored using only four colors, in such a way that no region is colored using the same color as a neighbor region. He…
Description A thief is running away! We can consider the city to N–. The tricky thief starts his escaping if and only if there is a street between cross u and cross v. Notice that he may not stay at the same cross in two consecutive moment. The cops…