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

×

spoj the benefactor

i dont know why i am getting wrong answer can any one please help me,thanks in advance link text

asked 08 Mar '15, 14:48

rnagarjuna's gravatar image

2★rnagarjuna
1519
accept rate: 0%


use two bfs,start from 1 and by using bfs find the node with max distace ,making this node as starting point find the node with maz distace Algorithm: start:=bfs(G,1); res:=bfs(G,start);

link

answered 22 Mar '15, 23:15

pallesai's gravatar image

4★pallesai
176830
accept rate: 17%

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,135
×505
×29
×6

question asked: 08 Mar '15, 14:48

question was seen: 971 times

last updated: 22 Mar '15, 23:15