22
This is a cops-and-robbers challenge. Answer here if you are a cop (crossword maker), answer the companion question if you are a robber (crossword solver). You may take on both roles.
Cops (Puzzlers)
Your task is to write a 10×10 crossword puzzle where, instead of words or phrases, snippets of code are the solutions to clues. Each clue will be a nonempty sequence of characters such that running the snippet of code it refers to will print the sequence to stdout.
Your post must include three things:
- Your blank 10×10 crossword grid, using
#
for darks (clue separators) and_
for lights (cells to be filled in).- Every horizontal or vertical sequence of 2 or more lights (bounded by darks or the grid edge) is an entry you must write a clue for. For convenience you should number these in the usual way (left-to-right, top-to-bottom) by replacing the
_
at the start of each entry with a unique character identifier (e.g. 1, 2,..., A, B,...). - Your grid may have any number of darks.
- Your grid may have any number of clues.
- Horizontal entries are always read left-to-right and vertical ones top-to-bottom.
- Every horizontal or vertical sequence of 2 or more lights (bounded by darks or the grid edge) is an entry you must write a clue for. For convenience you should number these in the usual way (left-to-right, top-to-bottom) by replacing the
- A list of clues that contains every entry in your crossword, down and across.
- Clues must contain at least 1 and no more than 10 characters.
- If your clues contain spaces make sure they are obvious when you format your post.
- Header and footer code snippets, each 20 characters or less.
- These run respectively before and after a solution snippet, and may help in renaming long built-ins and such.
The procedure for ensuring a clue matches its corresponding code snippet is:
- Concatenate the header, the snippet, and the footer:
[header][snippet][footer]
. - Run this as a normal program (independent of past runs) and look at what was printed to stdout.
- If this matches the clue the snippet is a valid solution.
For simplicity you may only use printable ASCII (hex codes 20 to 7E) throughout. The header and footer alone may also contain tabs and newlines.
Additional Notes
- For any snippet, running
[header][snippet][footer]
should not take more than a minute on a decent modern computer. - You must specify your programming language (and version).
- You may not use any common hashing algorithms.
- You may not use external libraries.
- Everything in your code must be deterministic, time invariant, and not need a network connection.
#
and_
may occur in snippets (or anywhere else).- You may reveal some of the characters in the crossword as COTO has done. They still count as lights. Robbers are not required to use these, they are just nice hints.
Example
A simple example using Python 3. Header: p=print;t=5;
. No footer.
Unsolved grid:
##########
1___2___##
_###_#####
_###_#####
_###_#####
####_#####
####_#####
###3______
####_#####
####_#####
Clues:
ACROSS
1: 8
3: A!
DOWN
1: 7
2: 10
Valid solution:
##########
print(8)##
(###+#####
7###=#####
)###5#####
####;#####
####p#####
###p('A!')
####t#####
####)#####
Robbers (Solvers)
Your task is to solve the crosswords posted by the cops. You must use the same exact programming language as the crossword was given in, but otherwise any solution that matches all the clues is valid.
You may not solve your own crosswords, and you may only attempt to answer each of the other crosswords once.
Remember to post your solutions in the companion question.
Scoring
If a crossword is solved within 72 hours it is no longer in the running. Once a crossword has lasted unsolved for 72 hours it is considered immune and the creator may post the solution (by editing their post and marking it immune).
The winning cop is the user who submitted the immune crossword with the fewest darks (#
). In case of ties the highest voted submission wins. The solution must be posted for the answer to be accepted.
The winning robber is the user who solves the most crosswords. The tie-breaker is their sum of up-votes in the companion question.
Man, these take a while to make. I'm working on one, but I'm being intentional and careful in order to make one without darks, attempting to be devious. – mbomb007 – 2015-01-16T20:40:56.323
Is this still active? Can I post new things here? – ASCIIThenANSI – 2015-04-28T18:20:39.800
@ASCIIThenANSI You're welcome to, but there may not be many who will try to crack your entry. – Calvin's Hobbies – 2015-04-28T18:40:31.380
@Calvin'sHobbies OK. Thanks. I'm actually going to see if there's any for me to crack C: – ASCIIThenANSI – 2015-04-28T18:48:57.963
I thought this was a fun challenge. It's a pity there weren't many answers/robbers. – mbomb007 – 2017-02-21T18:05:35.170
@grc Sure. The snippet is appended directly to it. – Calvin's Hobbies – 2014-10-25T03:56:09.433
1You're already bored with Code Tetris? – feersum – 2014-10-25T05:48:43.130
3@feersum Nobody is solving those. I'm hoping this one is easier on the robbers. – Calvin's Hobbies – 2014-10-25T05:59:05.207
9Header:
sha512sum <<<"
, footer:"|head -c10
(in Bash). – jimmy23013 – 2014-10-25T07:34:05.5431@user23013 Yikes. I think I'll forbid hashing. – Calvin's Hobbies – 2014-10-25T07:46:09.477
Designing these crosswords is so much fun. Mine is in CJam, I'll post it later today – None – 2014-10-25T09:34:41.227
"...it is considered immune and the creator may post the solution." Edit it into the answer in this thread, or post it in the robbers thread and link to it? – None – 2014-10-25T11:28:09.933
1Damn, 10x10 is too small for some fun Mathematica grids. :D – Martin Ender – 2014-10-25T12:39:46.327
@professorfish It doesn't really matter but you can just edit the post here. Perhaps put the solution in spoiler tags. – Calvin's Hobbies – 2014-10-25T16:59:59.113
The winning cop is the user who submitted the immune crossword with the fewest darks (#).
I think it should be the other way around, more darks makes it easier to solve so the more darks it has the less chances it wins. Winning with a lot of darks would be a lot harder than winning with none at all. Changing it this late into the competition wouldn't be nice though. – rodolphito – 2014-10-27T00:23:44.607@Rodolvertice Then a solution with 100 darks would instantly win. – Calvin's Hobbies – 2014-10-27T00:24:48.823
2@Rodolvertice Though then again it could be said to have been said to be instantly solved...so maybe you're right. But I agree that it is too late to change that (making a good puzzle with no darks isn't exactly trivial). – Calvin's Hobbies – 2014-10-27T00:32:00.750