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 1643. Attack of the Dark Fortress

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 ?
Sichov Evgeniy (ONPU) test 22 [5] // Problem 1643. Attack of the Dark Fortress 26 Jan 2009 16:22
Can you lell what was wrong with your program? I`m having WA 22... Please give me some test
Rustam Re: test 22 [3] // Problem 1643. Attack of the Dark Fortress 27 Jun 2009 00:25
i also used BFS, but have WA10. Your tests are passed on my computer. Could you give more tests?
Vit Demidenko test 21 // Problem 1643. Attack of the Dark Fortress 2 Mar 2010 19:43
5 7
..!....
.......
.####.*
.......
..$....

Answer: 4
This test help me with wa21
MAK Re: test 22 [1] // Problem 1643. Attack of the Dark Fortress 2 Sep 2010 13:56
This one helped me to deal with WA10.
1 3
!*$
Answer: Impossible
The Financier Re: test 22 // Problem 1643. Attack of the Dark Fortress 7 Aug 2011 13:54
Interesting problem. But only after few WA I understood problem statement correctly :)
Anton Chaplygin[Kungur,Perm kray] Re: test 22 // Problem 1643. Attack of the Dark Fortress 14 Aug 2011 12:49
There is something wrong with limitations is the statement. I set maxN = 300 and got AC.
MOPDOBOPOT (USU) WA 11 // Problem 1643. Attack of the Dark Fortress 5 Aug 2012 02:22
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.