WA.
My algo -
1.use tarjan to find the scc dag
2. build dag graph
3. visit the nodes in the dag in topological order and visit the connected nodes
4. all the nodes in the dag, that act as a starting point for the dfs() call are the answers.
5. list all the nodes of the answers, sort them and show ...
Search found 8 matches
- Fri Feb 01, 2013 10:20 pm
- Forum: Volume 12 (1200-1299)
- Topic: 1229 - Sub-dictionary
- Replies: 17
- Views: 12149
- Wed Jan 23, 2013 1:27 am
- Forum: Volume 2 (200-299)
- Topic: 247 - Calling Circles
- Replies: 21
- Views: 11249
Re: 247 - Calling Circles
Getting WA
Code: Select all
Removed after AC
- Tue Jan 01, 2013 5:55 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68797
Re: 11340 - Newspaper
Thanks a lot for the reply brianfry 

- Sun Dec 30, 2012 8:30 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68797
Re: 11340 - Newspaper
Changed that but still WA
- Sun Dec 23, 2012 2:10 am
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68797
Re: 11340 - Newspaper
Getting WA
Code: Select all
Removed after AC
- Tue Oct 09, 2012 3:16 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11792 - Krochanska is Here!
- Replies: 4
- Views: 3425
11792 - Krochanska is Here!
Could someone clarify the problem statement for me? From what I understand it is either
a) Find an important station form which the cost of visiting all other stations is minimum --(if multiple answers)--> Find the important station from which the cost of visiting all other important stations is ...
a) Find an important station form which the cost of visiting all other stations is minimum --(if multiple answers)--> Find the important station from which the cost of visiting all other important stations is ...
- Mon Jun 04, 2012 9:32 pm
- Forum: Volume 6 (600-699)
- Topic: 657 - The die is cast
- Replies: 46
- Views: 30362
Re: 657 - The die is cast
Thanks a lot. I changed the scanf-getchar to a gets-sscanf and got AC.brianfry713 wrote:Don't use getchar() and count on it to be a newline. That won't work if there are extra spaces in the input file.

- Tue May 29, 2012 7:44 pm
- Forum: Volume 6 (600-699)
- Topic: 657 - The die is cast
- Replies: 46
- Views: 30362
Re: 657 - The die is cast
Removed