Page 1 of 1

505 - Moscow time

Posted: Sat Apr 06, 2002 8:21 pm
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>

Posted: Wed Apr 10, 2002 9:46 am
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.

505 question about TIME_ZONEs

Posted: Wed Apr 23, 2003 12:59 am
by Farid Ahmadov
Hello.
Can be difference between TIME_ZONEs > 12 ?
(I mean in this problem).
Thank you.

505 test cases?

Posted: Fri Jan 26, 2007 11:32 am
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...

Is this right?

Posted: Tue Jun 19, 2007 7:40 pm
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

Posted: Wed Jun 20, 2007 3:16 am
by fidels
they look fine... or at least my program is getting those answers just as yours...

still WA tho...

Posted: Sat Feb 09, 2008 1:50 am
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.