Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: 2008 Winter Scripting Games have begun

by xdg (Monsignor)
on Feb 18, 2008 at 23:37 UTC ( [id://668697] : note . print w/replies, xml ) Need Help??


in reply to Re^4: 2008 Winter Scripting Games have begun
in thread 2008 Winter Scripting Games have begun

Well, the event description does have the following clause:

In addition, the word must appear in the file WordList.txt

That does sort of imply that even if you use nefarious means, you should be checking that a word from the 'nefarious' list is also in their WordList.

Of course, maybe they won't catch that. ;-)

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^6: 2008 Winter Scripting Games have begun
by Limbic~Region (Chancellor) on Feb 18, 2008 at 23:44 UTC
    xdg,
    Well, I calculated how many words were exactly 7 characters long and did not contain Q or Z. After removing duplicates (words that generated the same phone number), there were only 3818 entries. I precomputed all possible solutions and stuck them in __DATA__ so nefarious means =
    my %lookup = unpack("(A7A7)*", <DATA>);
    Provided they use the same wordlist.txt that was distributed in the kit, my solution is valid. Since I have been awarded 10 points, I assume they didn't really mean you have to point to 'C:\Scripts' when they run it.

    Cheers - L~R

      If it's the same wordlist, that certainly sounds sufficient to meet the requirement. Though I would say that approach could be considered more than "four lines" long. ;-)

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

        xdg,
        I chose my words carefully:

        ... my solution is only 4 lines of code ...

        The fact that I omitted 1 line of __DATA__ that is 53_452 bytes was an um oversight >:-)

        Cheers - L~R