Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

jl9394's blog

By jl9394, 15 years ago, In English
Hi, I am having a hard time understanding the question.

Formally, we shall regard as Cthulhu such an undirected graph that can be represented as a set of three or more rooted trees, whose roots are connected by a simple cycle.

What does it mean to be "represented as a set of three or more rooted trees", whose roots are connected by a simple cycle? What is a "simple cycle"?

Can anyone who solved the problem give me a hint? Thank you!
  • Vote: I like it
  • +2
  • Vote: I do not like it

| Write comment?
15 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Let us denote as a simple cycle a set of v vertices that can be numbered so that the edges will only exist between vertices number 1 and 2, 2 and 3, ..., v - 1 and v, v and 1.

A tree is a connected undirected graph consisting of n vertices and n - 1 edges (n > 0).

A rooted tree is a tree where one vertex is selected to be the root.

////////////////////////////////////////////////////////////

That's written right at the bottom of the problem statement. Be sure to check it first next time.