acmsguru |
---|
Finished |
read(n);Mescher successfully compiled his code, got WA on sample test and started long debugging... This story has become a true legend. So it's no surprise that Saratov ACM ICPC teams use the following definition: connected undirected graph with n vertices and n edges is called Mescheryakov Tree or, less formally, Mescher Tree. The area of application of Mescher trees is not well-studied, so we suggest you to solve one of the problems connected with such trees: given n, find the number of distinct Mescher trees with n vertices. Trees are labeled, i.e. two trees are considered distinct if and only if their adjacency matrices differ.
for i := 1 to n do begin
read(u, v);
g[u, v] := true;
g[v, u] := true;
end;
sample input | sample output |
3 | 1 |
Name |
---|