|
|
I tested for a long time and tried to understand why the thymus mockingly shows me such a mocking number, it's all because of the portals, it's just impossible there, I got so confused in them that I didn't understand how my code worked, in general, how to avoid such a problem. add all sorts of checks near the portals, which is right wherever there are portals, just destroy these portals completely, absolutely Try this test (if you look neighbour cells in order from -1 left -1 up (11 oclock) clockwise) 4 4 #A#. #A!. ##.# .*$. This test also helps with WA3 3 6 !AB#B* #####. $..... out: 6 There can be more than one portal of same type "Impossible" should start with uppercase 'I' Try this test 4 4 !### ABAA AABA *##$ The answer is 2 1) in: 3 5 ..*.. !.... ....$ out: 3 2) in: 5 8 ....AA.# .######! ...BA*## .####### ..B$...B out: 3 3) in: 5 8 ....AA.# .######! ....#*## .####### ..B$...B out: Impossible 4) in: 1 3 $*! out: Impossible 5) in: 1 3 *!$ out: 2 I have used BFS, but still WA 22 :-( Edited by author 26.10.2008 13:57 Edited by author 26.10.2008 14:04 Edited by author 26.10.2008 14:17 Now Accepted :-) All my tests are correct!!! Edited by author 26.10.2008 16:17 the army can stay in one point ? so in this input 1 3 *!$ the corresponding output is 2 ? Can you lell what was wrong with your program? I`m having WA 22... Please give me some test i also used BFS, but have WA10. Your tests are passed on my computer. Could you give more tests? 5 7 ..!.... ....... .####.* ....... ..$.... Answer: 4 This test help me with wa21 This one helped me to deal with WA10. 1 3 !*$ Answer: Impossible Interesting problem. But only after few WA I understood problem statement correctly :) There is something wrong with limitations is the statement. I set maxN = 300 and got AC. This test helped me to pass WA11: 3 5 .AAA! .A*A. $AAA. output: 2 Another interesting test: 1 12 #AB$#A!B#B*# output: 2 Edited by author 05.08.2012 02:31 Thanks! Thanks to your first test, I found out that I misunderstood the condition. Try this test: 3 3 ##$ #*# !## Answer: Impossible thank you! I am trying deal with this problem hi, I used bf search and all the things seem to work correctly, but I get WA 45... I have no idea what is my mistake... help me, please :) give me some tests You must use dijkstra not bfs Petru Trimbitas is incorrect; you do not have to use Dijkstra. why? I had the same WA19. This test helped me figure out the issue 10 10 ......#!#. ......##Z. ...Z...... ...Z*..... ...ZKK.... ......##.. .....K.##. .....##$#. ......###. .......... correct answer is 3, but my old code generated 4 my code gives 3, but I still got WA#19 Thank you very much! This test helped me when I had problems with test 11. Good tricky problem Edited by author 05.12.2012 05:22 How can gelu's army reach the castle in 11 days?? I think my program is correct, but i've gotten wa 27 three times. Does anyone know what this test iss? DFS - TL22 1.046s BFS - Accepted 0.031s Using DFS for shortest path problem? Great job! DFS have so clean and short realisation that i can't think about BFS even if it is required! :D Which answer for test 2 2 #$ !* Who have AC program, please help. Well, what is your answer? By reading the text, I understand that the armies cannot attack the fortress alone. So I think the answer should be 2 (one for joining the armies, one for attacking the fortress). Of course, the answer is 2. First step for meeting the armies and the second one for attack. Is it true that the army must use teleport? Or it can ignore teleport? No comment =) See the first sample - there is an answer to your question No! In samples no answer! In the first sample Katherina's army needs 8 days to arrive to Fortress, if it can ignore teleport, and 11 days, if it must use teleport. Or 10 days (using both B-teleport). At the same time Gelu's army arrives to Fortress using teleport at 11 days. Hence in this sample Katherina's army can come by several ways. Oh, yes, now I see that you're right. It's an oversight of the author of the problem, of course. An army may not use teleports. Finally! My code was accepted. For future solutions: the number of teleports may be more than two. There may be also 1 teleport, 2 teleports, 3 teleports,.. Edited by author 01.12.2011 00:24 |
|
|