814 - The Letter Carrier's Rounds

All about problems in Volume 8. 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
Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

814 - The Letter Carrier's Rounds

Post by Dominik Michniewski »

Could anyone help me and post some tricky IO for this problem ?
What should I print in such cases:
1 - MTA of sender doesn't exist. Should I print "connection between ..." or not ?
2 - mail sender doesn't exist in MTA ?

Any help would be great :-)

Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

carneiro
Learning poster
Posts: 54
Joined: Sun May 18, 2003 1:19 am
Location: Rio de Janeiro, Brazil
Contact:

Post by carneiro »

These cases do not exist.

I've asserted my program to check for that .

But I still get Wrong Answer anyway ... don't know why (actually, i've got no idea why)

I'm looking for good Inputs !!!!!!!!!! please all you accepted people !

here's my test input

Code: Select all

MTA London 4 Fiona Paul Heather Nevil
MTA SanFrancisco 3 Mario Luigi Shariff
MTA Paris 3 Jacque Suzanne Maurice
MTA HongKong 3 Chen Jeng Hee
MTA MexicoCity 4 Conrado Estella Eva Raul
MTA Cairo 3 Hamdy Tarik Misa
*
Hamdy@Cairo Eminem@MexicoCity Conrado@MexicoCity Shariff@SanFrancisco Lisa@MexicoCity Eva@MexicoCity
*
Congratulations on your efforts !!
--Hamdy
*
Fiona@London Chen@HongKong Natasha@Paris
*
Thanks for the report! --Fiona
*
Paul@London Maurice@Paris Eva@MexicoCity Misa@Cairo Fiona@London Jacque@Paris
*
Testando essa merda pqp!
*
*
And this is MY WA output :

Code: Select all

Connection between Cairo and MexicoCity
     HELO Cairo
     250
     MAIL FROM:<Hamdy@Cairo>
     250
     RCPT TO:<Eminem@MexicoCity>
     550
     RCPT TO:<Conrado@MexicoCity>
     250
     RCPT TO:<Lisa@MexicoCity>
     550
     RCPT TO:<Eva@MexicoCity>
     250
     DATA
     354
     Congratulations on your efforts !!
     --Hamdy
     .
     250
     QUIT
     221
Connection between Cairo and SanFrancisco
     HELO Cairo
     250
     MAIL FROM:<Hamdy@Cairo>
     250
     RCPT TO:<Shariff@SanFrancisco>
     250
     DATA
     354
     Congratulations on your efforts !!
     --Hamdy
     .
     250
     QUIT
     221
Connection between London and HongKong
     HELO London
     250
     MAIL FROM:<Fiona@London>
     250
     RCPT TO:<Chen@HongKong>
     250
     DATA
     354
     Thanks for the report! --Fiona
     .
     250
     QUIT
     221
Connection between London and Paris
     HELO London
     250
     MAIL FROM:<Fiona@London>
     250
     RCPT TO:<Natasha@Paris>
     550
     QUIT
     221
Connection between London and Paris
     HELO London
     250
     MAIL FROM:<Paul@London>
     250
     RCPT TO:<Maurice@Paris>
     250
     RCPT TO:<Jacque@Paris>
     250
     DATA
     354
     Testando essa merda pqp!
     .
     250
     QUIT
     221
Connection between London and MexicoCity
     HELO London
     250
     MAIL FROM:<Paul@London>
     250
     RCPT TO:<Eva@MexicoCity>
     250
     DATA
     354
     Testando essa merda pqp!
     .
     250
     QUIT
     221
Connection between London and Cairo
     HELO London
     250
     MAIL FROM:<Paul@London>
     250
     RCPT TO:<Misa@Cairo>
     250
     DATA
     354
     Testando essa merda pqp!
     .
     250
     QUIT
     221
Connection between London and London
     HELO London
     250
     MAIL FROM:<Paul@London>
     250
     RCPT TO:<Fiona@London>
     250
     DATA
     354
     Testando essa merda pqp!
     .
     250
     QUIT
     221
[]s
Mauricio Oliveira Carneiro

UFP2161
A great helper
Posts: 277
Joined: Mon Jul 21, 2003 7:49 pm
Contact:

Post by UFP2161 »

Did you consider this line in the output section?
Also a message is addressed to the same user only once.

problem_solver
New poster
Posts: 2
Joined: Mon Oct 24, 2005 8:30 am

814

Post by problem_solver »

Hello all,

still can't figure out why 814 was not accepted. Have found here that you have to check for duplicate recipients: "z@z.com z@z.com". But no one mention about another problem - you also have to check for more than one spaces between recipients:

Input:

Code: Select all

MTA London 4 Fiona Paul Heather Nevil
MTA SanFrancisco 3 Mario Luigi hariff
MTA Paris 3 Jacque Suzanne Maurice
MTA HongKong 3 Chen Jeng Hee
MTA MexicoCity 4 Conrado Estella Eva Raul
MTA Cairo 3 Hamdy Tarik Misa
*
Hamdy@Cairo    Conrado@MexicoCity     Shariff@SanFrancisco    Shariff@SanFrancisco    Lisa@MexicoCity
*
Congratulations on your efforts !!
--Hamdy
*
Fiona@London Chen@HongKong Natasha@Paris
*
Thanks for the report!  --Fiona
*
*
Output:

Code: Select all

Connection between Cairo and MexicoCity
     HELO Cairo
     250
     MAIL FROM:<Hamdy@Cairo>
     250
     RCPT TO:<Conrado@MexicoCity>
     250
     RCPT TO:<Lisa@MexicoCity>
     550
     DATA
     354
     Congratulations on your efforts !!
     --Hamdy
     .
     250
     QUIT
     221
Connection between Cairo and SanFrancisco
     HELO Cairo
     250
     MAIL FROM:<Hamdy@Cairo>
     250
     RCPT TO:<Shariff@SanFrancisco>
     550
     QUIT
     221
Connection between London and HongKong
     HELO London
     250
     MAIL FROM:<Fiona@London>
     250
     RCPT TO:<Chen@HongKong>
     250
     DATA
     354
     Thanks for the report!  --Fiona
     .
     250
     QUIT
     221
Connection between London and Paris
     HELO London
     250
     MAIL FROM:<Fiona@London>
     250
     RCPT TO:<Natasha@Paris>
     550
     QUIT
     221
Now instead of WA I've received Presentation Error. Where/Why, please somebody help me.

Thank you in advance!

problem_solver
New poster
Posts: 2
Joined: Mon Oct 24, 2005 8:30 am

Post by problem_solver »

I have found world Finals Solution:
http://contest.mff.cuni.cz/archive/finl1999/

but even this solution gives WA... :(

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo »

If you get a PE, check this statement in the description:
No innecessary spaces should be printed
It turns out that the message may contain trailing spaces that you need to remove.
Also, if after you remove trailing spaces, the line of message is empty, then you don't print the 5 spaces.

By the way, the world finals solution for that site gives WA for a couple of the problems, so don't take it seriously.

Post Reply

Return to “Volume 8 (800-899)”