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

×

How to solve this problems on UVA ?

I am trying to solve this problems Problem.I think the solution is to find the number of connected components for the given graph.
So by doing a simple DFS we can get the no of connected components.
Am I right or not ?

asked 08 Sep '15, 22:06

pallesai's gravatar image

4★pallesai
176830
accept rate: 17%

edited 08 Sep '15, 22:06


No, As the question states that b will get light up if a does which means that graph is directed. so if u are talking about strongly connected components in directed graph, it will not help you because in the input 2 you will observe that no of SCC is 4.

link

answered 09 Sep '15, 14:49

madhur123's gravatar image

4★madhur123
10515
accept rate: 22%

edited 09 Sep '15, 14:58

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:

×368

question asked: 08 Sep '15, 22:06

question was seen: 513 times

last updated: 09 Sep '15, 14:58