11568 - Pincer Attack!!

All about problems in Volume 115. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
SerailHydra
New poster
Posts: 20
Joined: Mon Oct 20, 2008 6:26 am

11568 - Pincer Attack!!

Post by SerailHydra » Sun Dec 28, 2008 2:36 am

Can anyone provide some tricky test? It's such a troublesome code.

baodog
Experienced poster
Posts: 202
Joined: Wed Jul 04, 2007 6:53 am

Re: 11568 - Pincer Attack!!

Post by baodog » Fri Jan 02, 2009 11:25 pm

Hi,

I keep get WA. Is the following io I got correct? Thanks in advance!!

Code: Select all

8
########
#S#    #
#E     #
# ##   #
###    T
###   ##
##  X ##
########
8
########
#S#    #
#E  #  #
T ##   #
###    #
###   ##
##  X ##
########
8
########
#S#E   #
#      #
#      #
T #    #
###   ##
##  X ##
########
8
########
#S#W   #
#      #
#      #
T #    #
###   ##
##  X ##
########
8
########
# #E   #
#    N #
#      #
T #    #
###   ##
##  X ##
########
8
########
# #N   #
#      #
#    W #
T #    #
###   ##
##  X ##
########
8
########
#S#W   #
#      #
#      #
T #    #
###   ##
##  X ##
########
0
Output:

Code: Select all

ENNEE
You can't escape...
NNWXNWWSW
NNWXNWWSW
NWNNWWSW
NXWNNWWSW
NNWXNWWSW

coze
New poster
Posts: 26
Joined: Tue Nov 27, 2007 7:56 am
Location: Japan

Re: 11568 - Pincer Attack!!

Post by coze » Fri Jan 02, 2009 11:43 pm

My AC output:

Code: Select all

ENNEE
You can't escape...
NNWXNNWSWSW
NNWXNNWSWSW
NWNNWWSW
NXWNNWWSW
NNWXNNWSWSW

baodog
Experienced poster
Posts: 202
Joined: Wed Jul 04, 2007 6:53 am

Re: 11568 - Pincer Attack!!

Post by baodog » Fri Jan 02, 2009 11:53 pm

1) Does bumping into mean robot and person cannot be in *adjacent" squares? Or just that they cannot be in same square?

2) Can robots see through each other?

3) What's wrong with NNWXNWWSW for my 3rd example? why a longer path is required? I simulate this and it looks perfectly fine to me.

Thanks!

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

Re: 11568 - Pincer Attack!!

Post by Observer » Sat Jan 03, 2009 5:38 am

Hi,
baodog wrote:1) Does bumping into mean robot and person cannot be in *adjacent" squares? Or just that they cannot be in same square?

2) Can robots see through each other?

3) What's wrong with NNWXNWWSW for my 3rd example? why a longer path is required? I simulate this and it looks perfectly fine to me.

Thanks!
1) They cannot be in the same square. So, you cannot move into a square occupied by a robot.
2) The movement of a robot doesn't depend on the other.
3) I guess it is related to my point 1)?
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

baodog
Experienced poster
Posts: 202
Joined: Wed Jul 04, 2007 6:53 am

Re: 11568 - Pincer Attack!!

Post by baodog » Sun Jan 04, 2009 2:34 am

Thanks! Got accepted.

Post Reply

Return to “Volume 115 (11500-11599)”