![]() |
HP Forum HHC Programming contest idea / possible rules - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP Forum HHC Programming contest idea / possible rules (/thread-196751.html) |
HP Forum HHC Programming contest idea / possible rules - Gene Wright - 09-20-2011 Hi all. I think I have the final RPN programming problem figured out in my head at least and thought about trying to have a contest here at the forum this weekend for those who cannot attend the HHC in San Diego. Here's what I was thinking: 1) Post the problem here early Saturday morning San Diego time. 2) Post the rules here as well, one of which will be for anyone in the forum who is working on the problem NOT to post their solutions, etc. here in the forum until after the end time of the contest. That would not be cool. :-) 3) Solutions should be emailed to my email address by the end time of the contest (which would be Sunday afternoon San Diego time). 4) I determine the winner of the forum submissions. 5) After the deadline... post away here at the forum with your solutions. :-) This would require discipline not to search the internet for help, not to post solutions here early, etc. The winner of the forum contest would receive world-wide fame and fortune and some sort of prize from me. :-)
Re: HP Forum HHC Programming contest idea / possible rules - Thomas Radtke - 09-20-2011 I's a good idea to compete in the dark, so to say. I'll be there on Saturday with my 32SII between my teeth.
Re: HP Forum HHC Programming contest idea / possible rules - Gene Wright - 09-20-2011 Well, the HHC attendees will be competing against each other, but those who cannot attend often want to compete too.
As long as people respect the goal of the contest which is to figure out your best effort on your own and not to publicize anything until after the contest is over!
Re: HP Forum HHC Programming contest idea / possible rules - Pal G. - 09-20-2011 I think this would be fun for those of us who cannot attend. Thanks for thinking of us non-attendees.
Re: HP Forum HHC Programming contest idea / possible rules - David Ramsey - 09-20-2011 When would we have time to work on the problem? The Saturday conference goes until 10PM!
Re: HP Forum HHC Programming contest idea / possible rules - Gene Wright - 09-20-2011 But we don't start again until Sunday at 9am or so.
?
Re: HP Forum HHC Programming contest idea / possible rules - Marcus von Cube, Germany - 09-20-2011 Hey, I've brought my wife and she will not be on the conference! No chance to win the contest. :-(
;-)
Re: HP Forum HHC Programming contest idea / possible rules - Eric Smith - 09-21-2011 Have her write contest entry for you. (Or would that violate the rules?)
Re: HP Forum HHC Programming contest idea / possible rules - C.Ret - 09-22-2011 Quote:
Not sure, there is a lot of distractions in San Diego:
Not sure your wife will be concentrate enought on the contest to make you win [;-)] Edited: 22 Sept 2011, 4:23 a.m.
Re: HP Forum HHC Programming contest idea / possible rules - Howard Owen - 09-22-2011 Quote:
Yes, you are 9 hours ahead when we are both on summer or both on winter time. We are still on summer (daylight savings) time here. I think you are as well?
I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Gene Wright - 09-22-2011 I have (inefficiently) programmed the problem on a 15c LE and on the 34S so I know it can be done. lol. Speed is of course important, but I hope people will try the problem on other, not-quite-as-fast machines. I also hope you will enjoy thinking through the problem.
Everyone agree? :-)
Re: HP Forum HHC Programming contest idea / possible rules - Dave Shaffer (Arizona) - 09-22-2011 Quote:
Alternatively (since I don't know what time Paris is on), when on Daylight Savings Time compared to GMT, San Diego is 7 hours different (I can't decide whether this should be called "later" or "earlier"!). i.e. at GMT midnight (beginning of the new day), it is 5 PM (the previous day) in San Diego. During regular time, the offset is 8 hours.
Re: HP Forum HHC Programming contest idea / possible rules - Walter B - 09-22-2011 Quote:Like most of the EU, also Paris claims to see the sun 1h earlier than Greenwich. Portugal's the only country on the continent joining British time. Re: HP Forum HHC Programming contest idea / possible rules - Dave Shaffer (Arizona) - 09-22-2011 I am under the impression that not even Britain is on GMT (?) but an hour (or two in the summer) different.
Re: HP Forum HHC Programming contest idea / possible rules - C.Ret - 09-23-2011 Thank you, all this is of great help. I am now sure not to miss start and end of the contest :-)
Re: HP Forum HHC Programming contest idea / possible rules - Marcus von Cube, Germany - 09-23-2011 The 9 hours is correct. I'm still fighting the jet lag.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Werner - 09-25-2011 Agree. No solution, no hint. 41C 58 bytes, r=100, (x,y)=(1,1) in 21.38 secs
Let's see how I fared.. Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Thomas Radtke - 09-25-2011 32SII, r=100: 45 byte, 10s. Not really optimized, I fear.
This was very much fun, and brought back a lot of the old fascination in this particular calculator. Thanks for it, Gene! :-)
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Werner - 09-25-2011 41C, 39 bytes, r=100 in 14.75s I can only hope the 32SII is much faster than the 41C ;-)
Werner
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Paul Dale - 09-25-2011 34S 21 steps, r=100 sub 1 second :-) My fastest version is twice the size and about seven times faster but sadly incorrect.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Dave Shaffer (Arizona) - 09-25-2011 Quote: A bit like the joke at NASA about spacecraft missions a while ago:
"Better, Faster, Cheaper - pick two out of three!"
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Dieter - 09-25-2011 35s: just 19 steps including LBL and RTN.
Dieter
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Gerson W. Barbosa - 09-25-2011 HP-12C: 48 steps, r=100 -> 97 seconds (equivalent to about 43 seconds on the 41C).
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Paul Dale - 09-25-2011 :-) In this case I'm sure the program can be fixed to give the expected results without any time penalty. I spent way too long fiddling around with the problem already and have real life things to get done. So yes, that quote applies.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Werner - 09-26-2011 By my reckoning it's 11PM San Diego time, so I can post a solution:
Cheers, Werner
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Paul Dale - 09-26-2011 Nice idea counting dark pixels. Will terminate sooner than counting lit ones.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Paul Dale - 09-26-2011 Thinking about this some more, it won't terminate much sooner for large radii. e.g. At a radius of 250, it stops 10% sooner. Still a neat way to approach the problem. Working with octants instead of quadrants should save more.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Werner - 09-26-2011 But I work with octants already..
Cheers, Werner
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Gerson W. Barbosa - 09-26-2011 Very well explained! Here's my approach, with much less detailed explanations:
x x x x x . . . | . .
d = 2*5 + 2^2 = 14
The total number of lit pixels is n = 4*(r^2 - d^2) = 4*(100 - 14) = 344 That's the same number returned by your program.
The HP-12C program is almost a direct translation of the following BASIC program, hence its inefficiency: 5 CLS
Keystrokes |Display | It should run faster on the 12C+ with the latest firmware.
Gerson.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Gerson W. Barbosa - 09-26-2011 Quote: On the other hand, mine loops 71 times, exactly the complement. At least, it returns the same result :-) Cheers,
Gerson.
Re: I will post the RPN HHC Programming problem here Saturday A.M. San Diego time... - Paul Dale - 09-26-2011 Quote: Oops, sorry I missed that :-( The best of both options then.
|