ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1709. Penguin-Avia

Husan WA4 [3] // Problem 1709. Penguin-Avia 5 Oct 2009 04:55
Please give me some tests
Oleg Strekalovsky aka OSt [Vologda SPU] Re: WA4 [2] // Problem 1709. Penguin-Avia 16 Oct 2009 21:26
I don't use any graphs algorithms,but only DFS.
If you try to solve this problem like me do:
1) break(remove) all cycles
2)Store elements of graph,witch belong to different component's of graph.
3) Connect one of them with others. (one - to every).
Not every to every!!!

Test
6
1000000 1000000
010000
100000
000100
001000
000001
000010



Edited by author 16.10.2009 21:29
Hikmat Ahmedov I have WA5 // Problem 1709. Penguin-Avia 31 Jan 2012 21:03
Is this one of the solutions to the above given test?

2000000
00a0a0
000000
a00000
000000
a00000
000000
amomorning Re: WA4 // Problem 1709. Penguin-Avia 4 Jun 2015 11:31
thx