Post Reply 
HHC 2018 Programming Contests
10-04-2018, 03:47 PM (This post was last modified: 10-05-2018 07:20 PM by Gerson W. Barbosa.)
Post: #64
RE: HHC 2018 Programming Contests
Code:

%%HP: T(3)A(D)F(.);
\<< RCLF RAD { 190. 305. 454. 569. 949. } { 91. 371. 553. 833. 1015. } { 63. 259. 385. 581. 707. } 5. ROLL DUP DATE DUP UNROT DDAYS 3. NDUPN \->LIST { 644. 924. 759. } MOD { } 1. 3.
  FOR i SWAP DUP i GET 5. NDUPN \->LIST 6. ROLL SWAP - DUP 0. > *
    WHILE DUP HEAD NOT
    REPEAT TAIL
    END 1. GET ROT +
  NEXT SWAP DROP SORT OBJ\-> DROP DROP2 DATE+ DUP UNROT DDAYS DUP + \pi * DUPDUP \->V3 AXL { 23. 28. 33. } / SIN ROT STOF
\>>
439 bytes, CK = #552Dh, 0.8 seconds. It works for all examples I've tried. Nicer output still missing :-)


(04-Oct-2018, 16:41) P.S.: The output has been improved by a little bit at the cost of a few bytes. No tagging, but the order is { P E I } :

Code:

%%HP: T(3)A(R)F(.);
\<< RCLF RAD { 190. 305. 454. 569. 949. } { 91. 371. 553. 833. 1015. } { 63. 259. 385. 581. 707. } 5. ROLL DUP DATE DUP UNROT DDAYS 3. NDUPN \->LIST { 644. 924. 759. } MOD { } 1. 3.
  FOR i SWAP DUP i GET 5. NDUPN \->LIST 6. ROLL SWAP - DUP 0. > *
    WHILE DUP HEAD NOT
    REPEAT TAIL
    END 1. GET ROT +
  NEXT SWAP DROP SORT OBJ\-> DROP DROP2 DATE+ DUP UNROT DDAYS DUPDUP 3. \->LIST { .273181969877 .224399475256 .190399554763 } * SIN 100. * 0. RND ROT STOF
\>>

444 bytes, CK = # 99F8h

22.021950 ->             30.012019
                   {-100. 100. 0.}


P.P.S.: 1 GET is less elegant than HEAD, but takes a nibble less. Also, on the HP-50g NIP is shorter than SWAP DROP:

Code:

%%HP: T(3)A(D)F(.);
\<< RCLF RAD { 190. 305. 454. 569. 949. } { 91. 371. 553. 833. 1015. } { 63. 259. 385. 581. 707. } 5. ROLL DUP DATE DUP UNROT DDAYS 3. NDUPN \->LIST { 644. 924. 759. } MOD { } 1. 3.
  FOR i SWAP DUP i GET 5. NDUPN \->LIST 6. ROLL SWAP - DUP 0. > *
    WHILE DUP 1. GET NOT
    REPEAT TAIL
    END 1. GET ROT +
  NEXT NIP SORT OBJ\-> DROP DROP2 DATE+ DUP UNROT DDAYS DUPDUP 3. \->LIST { .273181969877 .224399475256 .190399554763 } * SIN 100. * 0. RND ROT STOF
\>>

441 bytes, CK = # DD4Dh
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 - 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 - Gerson W. Barbosa - 10-04-2018 03:47 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: 29 Guest(s)