HHC 2015 RPN programming Contest is now open
|
10-03-2015, 03:29 PM
Post: #85
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(10-02-2015 01:01 PM)David Hayden Wrote:(10-01-2015 04:30 PM)Peter Murphy Wrote: Would anyone be willing to discuss the scheme or schemes they used to solve this?Egan's first solution works by taking each unique die value X and summing up 10X. For example, if the roll is 4 3 5 3 1, it will add up 104 + 103 + 105 + 101 = 111,010. It then looks for 1111 in the sequence. In this example, 1111 doesn't appear so there is no small straight. Others took this approach as well including Werner's 42-byter. However Werner looked for >= 1111 so that nothing was required to remove dups. I was working on a similar solution, but decided to pursue different approaches, including your flag approach, but I never finished it. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)