You are not logged in. Please login at www.codechef.com to post your questions!

×

Difficulty in solving CNTTREE from SPOJ.

I was looking attempting the problem CNTTREE from SPOJ, but I am completely clueless on how to solve such problems. I don't even understood the sample test case.

This problem is also there on codechef, I looked at the editorial but appeared very overwhelming.

Can anyone please explain how to solve this problem, with the background of such problems.

asked 14 May, 08:06

arpit728's gravatar image

2★arpit728
6831253
accept rate: 10%

// I don't even understood the sample test case. Make sure you know the definition of Diameter of a tree, as well the meaning of a subtree.

(15 May, 15:30) sorb19974★

@sorb1997

Can you please explain.

(16 May, 22:39) arpit7282★

@vivek_1998299 @vijju123

Can you please check this out?

(19 May, 13:23) arpit7282★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,623
×1,168
×44

question asked: 14 May, 08:06

question was seen: 108 times

last updated: 19 May, 13:23