736 - Lost in Space

All about problems in Volume 7. 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
afonsocsc
New poster
Posts: 34
Joined: Mon Mar 24, 2003 1:15 am
Location: Portugal, Lisbon

736 WA

Post by afonsocsc »

Solved!

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

Code: Select all

3
  A
BCD
E G
ABE
Last edited by afonsocsc on Sun Sep 26, 2004 1:58 am, edited 1 time in total.
Ivan Silva
New poster
Posts: 7
Joined: Wed Jun 05, 2002 3:27 pm
Location: Portugal
Contact:

Post 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
Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

736 - Lost in Space

Post 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.. =)
titid_gede
Experienced poster
Posts: 187
Joined: Wed Dec 11, 2002 2:03 pm
Location: Mount Papandayan, Garut

Post 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-
Kalo mau kaya, buat apa sekolah?
predicate
New poster
Posts: 18
Joined: Tue Jun 17, 2014 9:32 pm
Location: Hyderabad, India

Re: 736 - Lost in Space

Post 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
Post Reply

Return to “Volume 7 (700-799)”