Let me try to explain to you why no one has responded to this.
Firstly, to golf one needs to know what algorithm one has to implement, in this case it involves knowing what a sudoku is. Do not assume everyone does, explain what it is and post a link or something.
Secondly, never restrict the type of algorithm that can be chosen as you have done in part II. Golfing well is all about choosing the right algo. Part II would certinally be smaller if in the form:
print ((ans_0,ans_1,...,ans_16)[$ARGV[0]]);
although there may be some shorter underlying mathematical expression. You seem to want that we implement some difficult method. Why? Some strange notion of program purity? Golf is not about creating something that is easily extendable to other cases. If that is what you want, specify a second argument to give the dimension of the sudoku. If you do not bound this then no list based solution will work. There may however still be a mathematical expression for this which is easier than what you want.
Thirdly, what with the "I wrote some code to help you verify that your program is producing the right* answers, but it's been raining here which unfortunately smudged some of the digits"? Are you saying that this code thus doesn't work? What is the point then?. This is a golf, providing test code is not abnormal. Providing test code that is broken simply to annoy the participant is a sure-fire way of having no participants.
Fourthly, "Update 1: lines should not exceed 80 characters."? WHY NOT? If there is no good reason do not impose stupid restrictions, certainaly not as an after thought.
Now, go have a tasty cup of longjin tea and then try again.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.