|
|
27 5 O-O-O-O-O-O-O O-O-O-O-O-O-O |\ \| | | |/| |\| | | |/ /| O-O O O O O O-O O O O O O-O |/ / /| |\ \| |/ /| |\ \ \| O-O-O-O-O-O-O O-O-O-O-O-O-O Answer: Just a picture Edited by author 20.06.2023 20:06 What can you tell me about test#10? Is it correct? Can't get it. What in this test case. P.S. finding bridges from e-maxx with deep of recursion. I got WA #7 several times. If u also got WA just try this test: 9 5 O-O-O-O-O |\ \|/ /| O-O O O-O |/|\ /|\| O-O-O-O-O It helped me to get AC. I've got wa16 :( Please give me some useful tests. In test 16 there is a other simbol that not is 'O','-','|','/','\',' '. the answer is no. Sorry for poor Engilsh. 15 15 O-O-O-O-O-O-O-O |\| | | | | |/| O O-O-O-O-O-O O |\ /| O-O O-O-O-O O-O |/ /| | | |\ \| O O-O O-O O-O O | | | | | | | | O O-O O-O O-O O |\ \| | | |/ /| O-O O-O-O-O O-O |/ \| O O-O-O-O-O-O O |/| | | | | |\| O-O-O-O-O-O-O-O Edited by author 01.10.2009 19:57 Wow! This test really helped me with WA#12. I just forgot to check if the graph is connected before finding bridges. Thank you a lot! Edited by author 03.01.2011 18:28 Edited by author 03.01.2011 18:28 In test 17 there is a bridge, that is an edge in connected graph removing which makes the graph disconnected. Edited by author 03.01.2007 01:20 Edited by author 30.12.2010 22:47 Edited by author 30.12.2010 23:00 Edited by author 25.08.2008 23:29 Thanks to author) And I'm the 100 person who've solved it) Edited by author 12.11.2007 16:16 agree... just one clever DFS :) I think this problem has more troubles with accurate coding, and checking map) I've made the most stupid finding all bridges (DFS for everyone) and got AC) But maybe you've solved it using ONLY clever DFS? Edited by author 13.11.2007 09:44 No, I solved it using one DFS and one function check :) Can you show me your code) It's interesting how to find all bridge in one DFS) my mail typhoon@e1.ru There are two algorithms of determining a bridge in the graph: simple and advanced. Simple algorithm O(n^2) works more than 1s if written in Java, but less than 1s if written in C++. I suggest to lower time limit to 0.5s, after that only advanced solutions O(n), (n=number of islands) will be accepted. My first C++ solution O(n^n) runs about 0.3sec, so i think it's useless to decrease time limit. Two weeks ago my solution in Java was accepted, recently I tried to submit it and got Crash. Using 'extends Thread' to increase stack size I got Accepted again. What happened to Java compiler? Was Java 6 installed? Edited by author 14.01.2007 08:00 I would be glad if someone could tell me exactly which of the restrictions are nedeed. It is unclear to me why I get WA at test16.. i think that my program works as I expect just that I have either to many or to less restrictions. which of them are nedeed? and is "Our neighbors were the Twelfth, the Twenty Fourth, and the Thirtieth islands..." relevant??? thanks "Our neighbors were the Twelfth, the Twenty Fourth, and the Thirtieth islands..." irrelevant WA17 too... it`s not error in bridge, maybe with input. in some test line have less then W character. this is bug in test, or not? will amyone who got AC tell us where's wrong? Depends on input. Each node of integer grid contains an island. |
|
|