23
0
Given the output of the cop's program (o
), the byte-count (n
) and the number of unique bytes (c
) used, come up with a corresponding piece of code that is n
bytes long with c
unique bytes which matches the cop's output o
.
This is the cops thread. Post solutions that are to-be-cracked here.
The robbers thread is located here.
Cops should post solutions like this:
#[Language], `n` Bytes, `c` Unique Bytes (c*n points) [Cracked](Link-To-Crack)
[Output]
---
(Optional spoiler)
Rules
- You may not take any input for your program.
- The program must use at least 1 byte, but cannot exceed 255 bytes.
- The output itself is also limited to 255 bytes.
- The program must have consistent output results when executed multiple times.
- If your submission is not cracked within 7 days, you may mark it as "safe".
- When marking it safe, post the intended solution and score it as
c*n
. - Only mark an answer as "safe" if you really want the +15 for an accepted answer; it's more fun to see how long you can go.
- When marking it safe, post the intended solution and score it as
Winning
- The uncracked post with the lowest
c*n
score, wins the cop's thread. - This will be decided after 10 safe answers, or a few weeks.
Caveats
- If you feel cocky, you may tell the user the algorithm using a spoiler tag.
Uncracked Submissions:
fetch("https://api.stackexchange.com/2.2/questions/147635/answers?order=desc&sort=activity&site=codegolf&filter=!.Fjs-H6J36vlFcdkRGfButLhYEngU&key=kAc8QIHB*IqJDUFcjEF1KA((&pagesize=100").then(x=>x.json()).then(data=>{var res = data.items.filter(i=>!/^#.*cracked/im.test(i.body_markdown)).map(x=>{const matched = /^ ?#{1,3} ?(?:(?:(?:\[|<a href ?= ?".*?">)([^\]]+)(?:\]|<\/a>)(?:[\(\[][a-z0-9/:\.]+[\]\)])?)|([^, ]+)).*[^\d](\d+) ?\[?(?:.*(?:byte|block|codel)s?)(?:\](?:\(.+\))?)? ?(?:\(?(?!no[nt][ -]competing)\)?)?/gim.exec(x.body_markdown);if(!matched){return;}return {link: x.link, lang: matched[1] || matched[2], owner: x.owner}}).filter(Boolean).reverse().forEach(ans=>{var tr = document.createElement("tr");var add = (lang, link)=>{var td = document.createElement("td");var a = document.createElement("a");a.innerHTML = lang;a.href = link;td.appendChild(a);tr.appendChild(td);};add(ans.lang, ans.link);add(ans.owner.display_name, ans.owner.link);document.querySelector("tbody").appendChild(tr);});});
<html><body><h1>Uncracked Submissions</h1><table><thead><tr><th>Language</th><th>Author</th></tr></thead><tbody></tbody></table></body></html>
@Arnauld ahhh... I had misspoken, they're both limited to 255. – Magic Octopus Urn – 2017-11-10T03:30:46.120
1Are functions allowed? (Provided that they return a string, I suppose.) – Arnauld – 2017-11-10T03:32:18.680
Presumably, the output has to be consistent when run? I.e. random generators are forbidden? – caird coinheringaahing – 2017-11-10T07:36:56.453
1@cairdcoinheringaahing. OP has said: "The program must have consistent output results when executed multiple times." – None – 2017-11-10T07:39:33.430
5Just a suggestion for future CnRs: challenges where the user can choose an arbitrary fixed output are quite problematic for CnRs because people can basically mash their keyboard (barring syntax restrictions) and post the result, because there's no need for the cop to understand what their program is actually doing. Otherwise, this is a neat challenge idea. :) – Martin Ender – 2017-11-10T08:07:05.300
@MartinEnder I don't think such answers are going to last for long. ;-P first of all in Python
ajd7g9hou2ig2og2
gives the same output asrokrgor9g9g49g4ujg49j
as well as most keyboard mashes: nothing, and I think that's true for most languages out there (or for example Husk would give the type error output, etc.) – Erik the Outgolfer – 2017-11-10T09:14:10.3374@EriktheOutgolfer As I said "barring syntax restrictions". The point wasn't that you actually post a random stream of characters, but a random valid program which you don't need to understand. And especially in many esolangs, it's very easy to write a program that outputs a decent amount of random garbage without having to understand what that program does. – Martin Ender – 2017-11-10T09:23:41.203
Closely related with different rules. – Arnauld – 2017-11-10T14:45:03.643
To get the number of unique bytes from a file:
sed -e 's/\(.\)/\1\n/g' < filename | sort | uniq | wc -l
– Joshua – 2017-11-12T15:44:31.7401
Considering that this challenge has already more than 30 answers, I suggest adding a code snippet which lists uncracked submissions like in this post.
– None – 2017-11-13T14:07:52.513@ThePirateBay did I manage to do that correctly? – Magic Octopus Urn – 2017-11-13T17:06:22.090
@MagicOctopusUrn. I fixed your script, please verify that it now works properly for all submissions. – None – 2017-11-13T21:01:07.883
@ThePirateBay AFAICT it seems good. – Magic Octopus Urn – 2017-11-13T21:28:18.253