Post Reply 
HHC 2018 Programming Contests
09-30-2018, 09:40 PM (This post was last modified: 09-30-2018 10:06 PM by Gerson W. Barbosa.)
Post: #33
RE: HHC 2018 Programming Contests
(09-30-2018 08:47 PM)3298 Wrote:  Your first example yields the same result on my program. P: -100, E: 62, I: 100.
The second one yields "Invalid Date". Kind of understandable 'cause I've yet to see a calendar with 28 or more months in a year. Tongue
Adjusted for my value of system flag 42, the program works and outputs a date that matches after being similarly adjusted. P: -100, E: 100, I: -54.
Actually, that exact date was my first test case too. High-Five!

I’m using mm/dd/yyyy format (but my program doesn’t depend on the date format, only dates should be entered accordingly).

Now 419 bytes, #EF6Eh.

1.011905 -> 10.102018
{-.99766872413 .623489809462 .998867339316 }

9.282018 -> 11.302018
{-.997668769192 1. -.54064081743}

2.271963 -> 9.292018
{-.99768769852 .623489808919 .99886733949}

No awe from the judge though, I fear :-)

Also, my last example doesn’t agree with Didier’s because I may have misinterpreted the concept of “Extrema date”. I have considered only (-1, 1) or (1, -1), but not (1, 1) and (-1, -1) pairs. I am probably wrong.

P.S.: Quoting again from the rules;

Quote:Once in a while, two cycles hit 100 and/or -100 simultaneously, as you can see on Day 63 above. Let’s call this an “Extrema Date”.

It’s clear from above that the pairs (1, 1) abd (-1, -1) should also be considered. My failure for not thoroughly reading the instructions. By fixing that the program should certainly grow larger than 485 bytes. There’s only one hour left, so I’ll let it as is. Anyway, it was fun to try.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2018 Programming Contests - Joe Horn - 09-13-2018, 02:17 PM
RE: HHC 2018 Programming Contests - pier4r - 09-13-2018, 06:29 PM
RE: HHC 2018 Programming Contests - Zaphod - 09-13-2018, 10:10 PM
RE: HHC 2018 Programming Contests - Gene - 09-13-2018, 10:56 PM
RE: HHC 2018 Programming Contests - Gene - 09-14-2018, 12:06 AM
RE: HHC 2018 Programming Contests - Jlouis - 09-19-2018, 07:00 PM
RE: HHC 2018 Programming Contests - sasa - 09-19-2018, 11:17 AM
RE: HHC 2018 Programming Contests - pier4r - 09-29-2018, 07:41 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 05:32 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 08:47 PM
RE: HHC 2018 Programming Contests - Gerson W. Barbosa - 09-30-2018 09:40 PM
RE: HHC 2018 Programming Contests - Gene - 09-29-2018, 07:22 PM
RE: HHC 2018 Programming Contests - Gene - 10-01-2018, 02:55 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 05:31 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 09:54 AM
RE: HHC 2018 Programming Contests - 3298 - 10-01-2018, 06:37 AM
RE: HHC 2018 Programming Contests - Werner - 10-01-2018, 01:42 PM
RE: HHC 2018 Programming Contests - Werner - 10-02-2018, 06:10 AM
RE: HHC 2018 Programming Contests - Namir - 10-04-2018, 06:09 PM
RE: HHC 2018 Programming Contests - Werner - 10-03-2018, 02:03 PM
RE: HHC 2018 Programming Contests - Werner - 10-04-2018, 05:55 AM
RE: HHC 2018 Programming Contests - 3298 - 10-04-2018, 02:48 PM
RE: HHC 2018 Programming Contests - 3298 - 10-05-2018, 08:26 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 12:07 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 04:21 PM



User(s) browsing this thread: 1 Guest(s)