Page 1 of 1

736 WA

Posted: Tue Apr 01, 2003 1:51 pm
by afonsocsc
Solved!

I wasn't reading well the input, for example:

Code: Select all

3
  A
BCD
E G
ABE

Posted: Thu Jun 26, 2003 3:13 am
by Ivan Silva
afonsocsc, i think i have the same problem!!!

since this is a multiple input problema and we got this frase in the problem text:
* lines N+2 through end of file: strings 1 to N characters long, containing no blanks.

What should we do? go on till end of file or wait for the next input? how do we know where begins the next input case?

i guess afonsocsc, is waiting for a blank line to begin the next input, but he got WA and me too so maybe its not that way... a little help is nedeed here plz :P

-Ivan

736 - Lost in Space

Posted: Fri Apr 23, 2004 7:59 am
by Larry
What's the output for:

Code: Select all

2
BB
DD
BB
(Yes, I realize it's multi-input, and handled that..)

Should this be

Code: Select all

(1,1) - E
(1,2) - W
or just

Code: Select all

(1,1) - E
Thanks. Also, can someone post some more inputs? Thanks.. =)

Posted: Sat Apr 24, 2004 11:29 am
by titid_gede
i guess the output should be:

(1,1) - E

i remembered when solve this problem. i think the most trickies input is like this: (where i was fail before):

Code: Select all

3
  A
BCD
E G
ABE

the result should be :

Code: Select all

ABE
not found
not :

Code: Select all

ABE
(1,1) - S
good luck, hope it helps.

-titid gede-

Re: 736 - Lost in Space

Posted: Mon Jul 13, 2015 6:40 pm
by predicate
the line
lines N+2 through end of file
causes a lot of confusion.
For each dataset, scan the input for words until you find a blank link, this will denote the end of the data set. Also
  • for each word, you have to print a blank line before you print the word
  • you have to print an extra blank line between datasets
here is some input/output to clear the confusion
input:

Code: Select all

2

3
  A
BCD
E G
ABE

4
LOST
I  N
SP A
C  E
ANT
LOT
S
PT

Code: Select all


ABE
not found


ANT
(3,4) - N

LOT
not found

S
(1,3) - N
(1,3) - NE
(1,3) - E
(1,3) - SE
(1,3) - S
(1,3) - SW
(1,3) - W
(1,3) - NW
(3,1) - N
(3,1) - NE
(3,1) - E
(3,1) - SE
(3,1) - S
(3,1) - SW
(3,1) - W
(3,1) - NW

PT
(3,2) - NE