505 - Moscow time

All about problems in Volume 5. 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
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

505 - Moscow time

Post by Adrian Kuegel »

Whats the trick with this problem? I have tested my program with this input:
MON, 23 JUL 1987 23:23:45 EDT
TUE, 03 DEC 1996 09:30:00 +0300
WED, 28 FEB 1987 23:23:45 -2112
SUN, 31 JUL 1987 23:23:45 -0204
WED, 28 FEB 01 23:23:45 +0103
WED, 28 FEB 1700 23:23:45 +0103
THU, 01 JUL 2001 00:23:45 +0503
WED, 28 FEB 1880 23:23:45 +0103
MON, 01 JAN 2000 00:01:45 UT
FRI, 01 MAR 2000 00:23:45 +0503
MON, 31 DEC 2001 00:23:45 -0503
MON, 01 JAN 2001 00:23:45 +0503
MON, 31 DEC 2001 23:23:45 +0103
MON, 31 DEC 0002 00:23:45 +0503
SAT, 31 DEC 2001 23:23:45 +0220
Output is:
MON, 23 JUL 1987 22:23:45 +0300
TUE, 03 DEC 1996 09:30:00 +0300
THU, 01 MAR 1987 23:35:45 +0300
MON, 01 AUG 1987 04:27:45 +0300
THU, 01 MAR 1901 01:20:45 +0300
THU, 01 MAR 1700 01:20:45 +0300
WED, 30 JUN 2001 22:20:45 +0300
THU, 29 FEB 1880 01:20:45 +0300
MON, 01 JAN 2000 03:01:45 +0300
THU, 29 FEB 2000 22:20:45 +0300
MON, 31 DEC 2001 08:26:45 +0300
SUN, 31 DEC 2000 22:20:45 +0300
TUE, 01 JAN 2002 01:20:45 +0300
SUN, 30 DEC 0002 22:20:45 +0300
SUN, 01 JAN 2002 00:03:45 +0300


<font size=-1>[ This Message was edited by: Adrian Kuegel on 2002-04-06 20:38 ]</font>
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

I have found my mistake. If you read the problem description,
GMT -0000
EDT -0400
you could think the '-' is only a seperator, or that was what I thought. But it is a minus.
Farid Ahmadov
Experienced poster
Posts: 131
Joined: Thu Apr 17, 2003 8:39 am
Location: Baku, Azerbaijan

505 question about TIME_ZONEs

Post by Farid Ahmadov »

Hello.
Can be difference between TIME_ZONEs > 12 ?
(I mean in this problem).
Thank you.
_____________
NO sigNature
fidels
New poster
Posts: 6
Joined: Thu Jan 25, 2007 4:07 pm
Location: La Plata, Argentina

505 test cases?

Post by fidels »

could someone please give me a few test cases for problem 505? i don't seem to be able to find what's wrong in my answer...
Crypto
New poster
Posts: 2
Joined: Tue Aug 01, 2006 2:30 pm

Is this right?

Post by Crypto »

I also have some trouble solving this problem.

Would you please check whether this output is correct?

Input:

Code: Select all

SUN, 03 DEC 1996 09:10:35 GMT
WED, 28 FEB 35 23:59:00 +0259
SUN, 31 DEC 2000 21:48:57 GMT
THU, 28 FEB 1600 21:50:59 GMT
THU, 28 FEB 1601 21:50:59 GMT
MON, 01 DEC 1702 23:00:59 PDT
TUE, 19 JUN 2007 09:19:00 PDT
MON, 01 JAN 03 00:00:01 +0400
SAT, 28 FEB 5000 23:59:59 +0200
Output:

Code: Select all

SUN, 03 DEC 1996 12:10:35 +0300
THU, 01 MAR 1935 00:00:00 +0300
MON, 01 JAN 2001 00:48:57 +0300
FRI, 29 FEB 1600 00:50:59 +0300
FRI, 01 MAR 1601 00:50:59 +0300
TUE, 02 DEC 1702 09:00:59 +0300
TUE, 19 JUN 2007 19:19:00 +0300
SUN, 31 DEC 1902 23:00:01 +0300
SUN, 01 MAR 5000 00:59:59 +0300
fidels
New poster
Posts: 6
Joined: Thu Jan 25, 2007 4:07 pm
Location: La Plata, Argentina

Post by fidels »

they look fine... or at least my program is getting those answers just as yours...

still WA tho...
Robert Gerbicz
Experienced poster
Posts: 196
Joined: Wed May 02, 2007 10:12 pm
Location: Hungary, Pest county, Halasztelek
Contact:

Post by Robert Gerbicz »

fidels wrote:they look fine... or at least my program is getting those answers just as yours...

still WA tho...
It's mportant, that in the output the year should have 4 decimal digits. So for example if the input is:

Code: Select all

SAT, 28 FEB 0125 23:00:12 -1201
then the correct output from my AC program:

Code: Select all

SUN, 01 MAR 0125 14:01:12 +0300
ps. It's possible that 28 FEB 125 isn't saturday, I've not checked that in reality the input is "correct" or not. But it isn't very important.
Post Reply

Return to “Volume 5 (500-599)”