问:
Print all colorings of a 3x3 grid
You have a 3x3 grid. Each cell can be colored black or white. Display all 512 of these colorings. Fewest bytes wins.

You can display the grids in any formation as long as they are visually separated and the spacing looks regular. You may use ASCII art or images. Any two distinct visible symbols or colors can be used for black and white. Any whitespace is fine as long as the result is visually correct.

Example output:

```<code>...
...
...

...
...
..X

...
...
.X.

...
...
.XX

...
...
X..

...
...
X.X

...
...
XX.

...
...
XXX

...
..X
...

...
..X
..X

...
..X
.X.

...
..X
.XX

...
..X
X..

...
..X
X.X

...
..X
XX.

...
..X
XXX

...
.X.
...

...
.X.
..X

...
.X.
.X.

...
.X.
.XX

...
.X.
X..

...
.X.
X.X

...
.X.
XX.

...
.X.
XXX

...
.XX
...

...
.XX
..X

...
.XX
.X.

...
.XX
.XX

...
.XX
X..

...
.XX
X.X

...
.XX
XX.

...
.XX
XXX

...
X..
...

...
X..
..X

...
X..
.X.

...
X..
.XX

...
X..
X..

...
X..
X.X

...
X..
XX.

...
X..
XXX

...
X.X
...

...
X.X
..X

...
X.X
.X.

...
X.X
.XX

...
X.X
X..

...
X.X
X.X

...
X.X
XX.

...
X.X
XXX

...
XX.
...

...
XX.
..X

...
XX.
.X.

...
XX.
.XX

...
XX.
X..

...
XX.
X.X

...
XX.
XX.

...
XX.
XXX

...
XXX
...

...
XXX
..X

...
XXX
.X.

...
XXX
.XX

...
XXX
X..

...
XXX
X.X

...
XXX
XX.

...
XXX
XXX

..X
...
...

..X
...
..X

..X
...
.X.

..X
...
.XX

..X
...
X..

..X
...
X.X

..X
...
XX.

..X
...
XXX

..X
..X
...

..X
..X
..X

..X
..X
.X.

..X
..X
.XX

..X
..X
X..

..X
..X
X.X

..X
..X
XX.

..X
..X
XXX

..X
.X.
...

..X
.X.
..X

..X
.X.
.X.

..X
.X.
.XX

..X
.X.
X..

..X
.X.
X.X

..X
.X.
XX.

..X
.X.
XXX

..X
.XX
...

..X
.XX
..X

..X
.XX
.X.

..X
.XX
.XX

..X
.XX
X..

..X
.XX
X.X

..X
.XX
XX.

..X
.XX
XXX

..X
X..
...

..X
X..
..X

..X
X..
.X.

..X
X..
.XX

..X
X..
X..

..X
X..
X.X

..X
X..
XX.

..X
X..
XXX

..X
X.X
...

..X
X.X
..X

..X
X.X
.X.

..X
X.X
.XX

..X
X.X
X..

..X
X.X
X.X

..X
X.X
XX.

..X
X.X
XXX

..X
XX.
...

..X
XX.
..X

..X
XX.
.X.

..X
XX.
.XX

..X
XX.
X..

..X
XX.
X.X

..X
XX.
XX.

..X
XX.
XXX

..X
XXX
...

..X
XXX
..X

..X
XXX
.X.

..X
XXX
.XX

..X
XXX
X..

..X
XXX
X.X

..X
XXX
XX.

..X
XXX
XXX

.X.
...
...

.X.
...
..X

.X.
...
.X.

.X.
...
.XX

.X.
...
X..

.X.
...
X.X

.X.
...
XX.

.X.
...
XXX

.X.
..X
...

.X.
..X
..X

.X.
..X
.X.

.X.
..X
.XX

.X.
..X
X..

.X.
..X
X.X

.X.
..X
XX.

.X.
..X
XXX

.X.
.X.
...

.X.
.X.
..X

.X.
.X.
.X.

.X.
.X.
.XX

.X.
.X.
X..

.X.
.X.
X.X

.X.
.X.
XX.

.X.
.X.
XXX

.X.
.XX
...

.X.
.XX
..X

.X.
.XX
.X.

.X.
.XX
.XX

.X.
.XX
X..

.X.
.XX
X.X

.X.
.XX
XX.

.X.
.XX
XXX

.X.
X..
...

.X.
X..
..X

.X.
X..
.X.

.X.
X..
.XX

.X.
X..
X..

.X.
X..
X.X

.X.
X..
XX.

.X.
X..
XXX

.X.
X.X
...

.X.
X.X
..X

.X.
X.X
.X.

.X.
X.X
.XX

.X.
X.X
X..

.X.
X.X
X.X

.X.
X.X
XX.

.X.
X.X
XXX

.X.
XX.
...

.X.
XX.
..X

.X.
XX.
.X.

.X.
XX.
.XX

.X.
XX.
X..

.X.
XX.
X.X

.X.
XX.
XX.

.X.
XX.
XXX

.X.
XXX
...

.X.
XXX
..X

.X.
XXX
.X.

.X.
XXX
.XX

.X.
XXX
X..

.X.
XXX
X.X

.X.
XXX
XX.

.X.
XXX
XXX

.XX
...
...

.XX
...
..X

.XX
...
.X.

.XX
...
.XX

.XX
...
X..

.XX
...
X.X

.XX
...
XX.

.XX
...
XXX

.XX
..X
...

.XX
..X
..X

.XX
..X
.X.

.XX
..X
.XX

.XX
..X
X..

.XX
..X
X.X

.XX
..X
XX.

.XX
..X
XXX

.XX
.X.
...

.XX
.X.
..X

.XX
.X.
.X.

.XX
.X.
.XX

.XX
.X.
X..

.XX
.X.
X.X

.XX
.X.
XX.

.XX
.X.
XXX

.XX
.XX
...

.XX
.XX
..X

.XX
.XX
.X.

.XX
.XX
.XX

.XX
.XX
X..

.XX
.XX
X.X

.XX
.XX
XX.

.XX
.XX
XXX

.XX
X..
...

.XX
X..
..X

.XX
X..
.X.

.XX
X..
.XX

.XX
X..
X..

.XX
X..
X.X

.XX
X..
XX.

.XX
X..
XXX

.XX
X.X
...

.XX
X.X
..X

.XX
X.X
.X.

.XX
X.X
.XX

.XX
X.X
X..

.XX
X.X
X.X

.XX
X.X
XX.

.XX
X.X
XXX

.XX
XX.
...

.XX
XX.
..X

.XX
XX.
.X.

.XX
XX.
.XX

.XX
XX.
X..

.XX
XX.
X.X

.XX
XX.
XX.

.XX
XX.
XXX

.XX
XXX
...

.XX
XXX
..X

.XX
XXX
.X.

.XX
XXX
.XX

.XX
XXX
X..

.XX
XXX
X.X

.XX
XXX
XX.

.XX
XXX
XXX

X..
...
...

X..
...
..X

X..
...
.X.

X..
...
.XX

X..
...
X..

X..
...
X.X

X..
...
XX.

X..
...
XXX

X..
..X
...

X..
..X
..X

X..
..X
.X.

X..
..X
.XX

X..
..X
X..

X..
..X
X.X

X..
..X
XX.

X..
..X
XXX

X..
.X.
...

X..
.X.
..X

X..
.X.
.X.

X..
.X.
.XX

X..
.X.
X..

X..
.X.
X.X

X..
.X.
XX.

X..
.X.
XXX

X..
.XX
...

X..
.XX
..X

X..
.XX
.X.

X..
.XX
.XX

X..
.XX
X..

X..
.XX
X.X

X..
.XX
XX.

X..
.XX
XXX

X..
X..
...

X..
X..
..X

X..
X..
.X.

X..
X..
.XX

X..
X..
X..

X..
X..
X.X

X..
X..
XX.

X..
X..
XXX

X..
X.X
...

X..
X.X
..X

X..
X.X
.X.

X..
X.X
.XX

X..
X.X
X..

X..
X.X
X.X

X..
X.X
XX.

X..
X.X
XXX

X..
XX.
...

X..
XX.
..X

X..
XX.
.X.

X..
XX.
.XX

X..
XX.
X..

X..
XX.
X.X

X..
XX.
XX.

X..
XX.
XXX

X..
XXX
...

X..
XXX
..X

X..
XXX
.X.

X..
XXX
.XX

X..
XXX
X..

X..
XXX
X.X

X..
XXX
XX.

X..
XXX
XXX

X.X
...
...

X.X
...
..X

X.X
...
.X.

X.X
...
.XX

X.X
...
X..

X.X
...
X.X

X.X
...
XX.

X.X
...
XXX

X.X
..X
...

X.X
..X
..X

X.X
..X
.X.

X.X
..X
.XX

X.X
..X
X..

X.X
..X
X.X

X.X
..X
XX.

X.X
..X
XXX

X.X
.X.
...

X.X
.X.
..X

X.X
.X.
.X.

X.X
.X.
.XX

X.X
.X.
X..

X.X
.X.
X.X

X.X
.X.
XX.

X.X
.X.
XXX

X.X
.XX
...

X.X
.XX
..X

X.X
.XX
.X.

X.X
.XX
.XX

X.X
.XX
X..

X.X
.XX
X.X

X.X
.XX
XX.

X.X
.XX
XXX

X.X
X..
...

X.X
X..
..X

X.X
X..
.X.

X.X
X..
.XX

X.X
X..
X..

X.X
X..
X.X

X.X
X..
XX.

X.X
X..
XXX

X.X
X.X
...

X.X
X.X
..X

X.X
X.X
.X.

X.X
X.X
.XX

X.X
X.X
X..

X.X
X.X
X.X

X.X
X.X
XX.

X.X
X.X
XXX

X.X
XX.
...

X.X
XX.
..X

X.X
XX.
.X.

X.X
XX.
.XX

X.X
XX.
X..

X.X
XX.
X.X

X.X
XX.
XX.

X.X
XX.
XXX

X.X
XXX
...

X.X
XXX
..X

X.X
XXX
.X.

X.X
XXX
.XX

X.X
XXX
X..

X.X
XXX
X.X

X.X
XXX
XX.

X.X
XXX
XXX

XX.
...
...

XX.
...
..X

XX.
...
.X.

XX.
...
.XX

XX.
...
X..

XX.
...
X.X

XX.
...
XX.

XX.
...
XXX

XX.
..X
...

XX.
..X
..X

XX.
..X
.X.

XX.
..X
.XX

XX.
..X
X..

XX.
..X
X.X

XX.
..X
XX.

XX.
..X
XXX

XX.
.X.
...

XX.
.X.
..X

XX.
.X.
.X.

XX.
.X.
.XX

XX.
.X.
X..

XX.
.X.
X.X

XX.
.X.
XX.

XX.
.X.
XXX

XX.
.XX
...

XX.
.XX
..X

XX.
.XX
.X.

XX.
.XX
.XX

XX.
.XX
X..

XX.
.XX
X.X

XX.
.XX
XX.

XX.
.XX
XXX

XX.
X..
...

XX.
X..
..X

XX.
X..
.X.

XX.
X..
.XX

XX.
X..
X..

XX.
X..
X.X

XX.
X..
XX.

XX.
X..
XXX

XX.
X.X
...

XX.
X.X
..X

XX.
X.X
.X.

XX.
X.X
.XX

XX.
X.X
X..

XX.
X.X
X.X

XX.
X.X
XX.

XX.
X.X
XXX

XX.
XX.
...

XX.
XX.
..X

XX.
XX.
.X.

XX.
XX.
.XX

XX.
XX.
X..

XX.
XX.
X.X

XX.
XX.
XX.

XX.
XX.
XXX

XX.
XXX
...

XX.
XXX
..X

XX.
XXX
.X.

XX.
XXX
.XX

XX.
XXX
X..

XX.
XXX
X.X

XX.
XXX
XX.

XX.
XXX
XXX

XXX
...
...

XXX
...
..X

XXX
...
.X.

XXX
...
.XX

XXX
...
X..

XXX
...
X.X

XXX
...
XX.

XXX
...
XXX

XXX
..X
...

XXX
..X
..X

XXX
..X
.X.

XXX
..X
.XX

XXX
..X
X..

XXX
..X
X.X

XXX
..X
XX.

XXX
..X
XXX

XXX
.X.
...

XXX
.X.
..X

XXX
.X.
.X.

XXX
.X.
.XX

XXX
.X.
X..

XXX
.X.
X.X

XXX
.X.
XX.

XXX
.X.
XXX

XXX
.XX
...

XXX
.XX
..X

XXX
.XX
.X.

XXX
.XX
.XX

XXX
.XX
X..

XXX
.XX
X.X

XXX
.XX
XX.

XXX
.XX
XXX

XXX
X..
...

XXX
X..
..X

XXX
X..
.X.

XXX
X..
.XX

XXX
X..
X..

XXX
X..
X.X

XXX
X..
XX.

XXX
X..
XXX

XXX
X.X
...

XXX
X.X
..X

XXX
X.X
.X.

XXX
X.X
.XX

XXX
X.X
X..

XXX
X.X
X.X

XXX
X.X
XX.

XXX
X.X
XXX

XXX
XX.
...

XXX
XX.
..X

XXX
XX.
.X.

XXX
XX.
.XX

XXX
XX.
X..

XXX
XX.
X.X

XXX
XX.
XX.

XXX
XX.
XXX

XXX
XXX
...

XXX
XXX
..X

XXX
XXX
.X.

XXX
XXX
.XX

XXX
XXX
X..

XXX
XXX
X.X

XXX
XXX
XX.

XXX
XXX
XXX
</code>```

Title: Print all colorings of a 3x3 grid

Body:
Perl, 52 bytes

printf+("%03b
"x3).$/,$_&7,$_/8&7,$_>>6&7 for 0..511

or 54 bytes:

print map$_.$/,sprintf('%09b',$_)=~/.../g,''for 0..511

or Perl 5.14+, 48 bytes:

say sprintf('%09b',$_)=~s/.../$&\n/gr for 0..511


答:
Mathematica, 56 bytes

```<code>#/.($|##->Max@##&@@@ConnectedComponents@Thread[#<->#2])&
</code>```

ContentLicense: CC BY-SA 3.0

Title: Array unification

Body:
Introduction

Consider two arrays of the same length, say A = [0,1,0,2] and B = [-1,1,2,2].
Suppose we know that their contents are equivalent in some sense, item by item:

0 is equivalent to -1,

1 is equivalent to 1,

0 is equivalent to 2, and

2 is equivalent to 2.

Equivalence is transitive: -1 and 0 are equivalent, and 0 and 2 are equivalent, so -1 and 2 are also equivalent.
The unification of A and B is the array where each item of A (or B) has been replaced by the largest number that's equivalent to it.
In this case, the unification would be [2,1,2,2].

The task

Write a program or function that takes two non-empty integer arrays of equal length, and outputs their unification. You can also modify one of the inputs in place instead of returning.
The lowest byte count wins.

Test cases

```<code>[0] [0] -> [0]
[1] [2] -> [2]
[0,-1] [-1,-1] -> [0,0]
[0,1,0] [2,1,0] -> [2,1,2]
[1,2,3] [0,0,1] -> [3,3,3]
[0,1,0,2] [-1,1,2,2] -> [2,1,2,2]
[1,0,1,-4] [-3,-1,-2,2] -> [1,0,1,2]
[1,2,3,-2] [1,0,-3,-2] -> [1,2,3,-2]
[-3,-2,-1,0,1] [-1,-1,-1,-1,-1] -> [1,1,1,1,1]
[-3,-2,-1,0,1] [2,-1,0,1,-3] -> [2,2,2,2,2]
[-3,5,5,3,1] [4,2,3,1,2] -> [4,5,5,5,5]
[4,0,2,-5,0] [0,4,-5,3,5] -> [5,5,3,3,5]
[-2,4,-2,3,2,4,1,1] [-2,4,1,2,2,3,1,-2] -> [1,4,1,4,4,4,1,1]
[-10,-20,-11,12,-18,14,-8,-1,-14,15,-17,18,18,-6,3,1,15,-15,-19,-19] [-13,6,-4,3,19,1,-10,-15,-15,11,6,9,-11,18,6,6,-5,-15,7,-11] -> [-8,14,18,14,19,14,-8,-1,-1,15,14,18,18,18,14,14,15,-1,18,18]
[20,15,2,4,-10,-4,-19,15,-5,2,13,-3,-18,-5,-6,0,3,-6,3,-17] [-18,7,6,19,-8,-4,-16,-1,13,-18,8,8,-16,17,-9,14,-2,-12,7,6] -> [20,15,20,19,-8,-4,20,15,17,20,17,17,20,17,-6,14,15,-6,15,20]
</code>```

Body:
Mathematica, 56 bytes

#/.($|##->Max@##&@@@ConnectedComponents@Thread[#<->#2])&


问:
Quine Anagrams! (Cops' Thread)
This is the cops' thread. For the robbers' thread, click here.

Cops' Task

First, write a quine in a language of your choosing.

Next, scramble the quine. Make sure to do this well as the robbers will be trying to unscramble it and find the original source code! Note that the scrambled code does not need to work.

Post an answer on this thread. Include the language, the byte count, and the scrambled code.

Your program may not print to STDERR.

Here is an example of a cop submission:

Python, 29 bytes

```<code>nt _%=_r;_riinp;pr_='t _%%%_'
</code>```

Robbers' Task

For the robbers' thread, click here.

Safe Submissions

If your submission has not yet been cracked after a week of posting, you may add the solution and specify that it is safe. If you do not, your submission may still be cracked.

Scoring

This is code-golf, so the user with the safe submission with the fewest bytes will be the winner of this section.

Leaderboard

Here is a stack snippet to generate a learderboard for this challenge. For it to display properly, please format your submission like this:

```<code># Language Name, N bytes

... other stuff ...
</code>```

If your submission gets cracked, please format like this:

```<code># Language Name, N bytes, [Cracked!](link)

... other stuff ...
</code>```

If your submission is safe, format like this:

```<code># Language Name, N bytes, Safe!

... other stuff ...
</code>```

```

答:
Underload, 20 bytes, Cracked!

```<code>~*)(a):*(*a:S(*S*~S)
</code>```

I scrambled this via randomizing the order of the characters, because what could be more scrambled than random?

A correctly written Underload interpreter crashes when seeing a newline at the top level of the program. As usual in golfing competitions, there's no newline at the end of the program; I'm just placing this reminder here because it's very easy to add one by mistake when copying the program to an interpreter.

Title: Quine Anagrams! (Cops' Thread)

Body:
Underload, 20 bytes, Cracked!

~*)(a):*(*a:S(*S*~S)

I scrambled this via randomizing the order of the characters, because what could be more scrambled than random?

A correctly written Underload interpreter crashes when seeing a newline at the top level of the program. As usual in golfing competitions, there's no newline at the end of the program; I'm just placing this reminder here because it's very easy to add one by mistake when copying the program to an interpreter.


问:
Pairable strings
A string is pairable if it can be split into subtrings, each of which is a string repeated twice consecutively. For example, aabaaababbbaba is pairable as:

```<code>aaba aaba
b b
ba ba
</code>```

Given a non-empty string of a's and b's, output a Truthy value if it's pairable and a Falsey value if it isn't.

Pairable:

```<code>aa
abaaba
bbababbb
aabaaababbbaba
babababa
bbbbbbbbbbbb
aaababbabbabbbababbaabaabaababaaba
aaaabaab
</code>```

Not pairable:

```<code>a
ba
baab
abaabaaba
bbbbbbbbbbbbbbb
baababbabaaaab
aaaaabbaaaaa
</code>```

I encourage you to come up with non-regex-based solutions even when there's already a shorter regex answer in your language. You can mark them as "no regex". By regex, I mean a built-in string pattern matching subsystem.

Leaderboard:

var QUESTION_ID=98252,OVERRIDE_USER=20260;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/98252/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
GNU Prolog, <s>49</s> 46 bytes

Probably works in other variants too, although they don't all represent strings the same way; GNU Prolog's representation is a useful one for this problem.

It's unclear whether this counts as using regex or not. It's not using any regex-like feature, but the entire semantics of the language are similar to those of regex.

New version (uses the recursion trick seen in some other answers):

```<code>s(X):-append(A,B,X),(A=B;A\=X,B\=X,s(A),s(B)).
</code>```

Older version:

```<code>s(X):-X=[];append(A,B,X),B\=X,append(C,C,A),s(B).
</code>```

This is a predicate (Prolog's equivalent of a function) called s, not a complete program. Use it like this:

```<code>| ?- s("aa").
true ?
yes
| ?- s("aaababbabbabbbababbaabaabaababaaba").
true ?
yes
| ?- s("baababbabaaaab").
no
| ?- s("bbbbbbbbbbbbbbb").
no
</code>```

An interesting feature of the older solution is that if you ask the interpreter "are there more solutions?" via use of ; at the true ? prompt (rather than asking "is there any solution" via pressing return at the prompt, like I did above), it returns "true" a number of times equal to the number of different ways the string can be expressed in the given form (e.g. it returns "true" twice with s("aaaa")., as this can be parsed as (a a)(a a) or as (aa aa)).

Prolog programs are often reversible (allowing s to generate a list of strings with the given property). The older one isn't (it goes into an infinite loop), but that's because of the golfed method I used to ensure that C is nonempty; if you rewrite the program to specify C as nonempty explicitly, it generates strings of the form "aa", "aabb", "aabbcc", and so on (Prolog being Prolog, it doesn't specify identities for the characters that make them up, just a specification of which characters are the same). The newer one generates strings of the form "aa", "abab", "abcabc", and so on; this is an infinite loop in its own right, and thus never hits the point at which it'd get stuck due to failing to detect a zero-length string.

Title: Pairable strings

Body:
GNU Prolog, <s>49</s> 46 bytes

Probably works in other variants too, although they don't all represent strings the same way; GNU Prolog's representation is a useful one for this problem.

It's unclear whether this counts as using regex or not. It's not using any regex-like feature, but the entire semantics of the language are similar to those of regex.

New version (uses the recursion trick seen in some other answers):

s(X):-append(A,B,X),(A=B;A\=X,B\=X,s(A),s(B)).

Older version:

s(X):-X=[];append(A,B,X),B\=X,append(C,C,A),s(B).

This is a predicate (Prolog's equivalent of a function) called s, not a complete program. Use it like this:

| ?- s("aa").
true ?
yes
| ?- s("aaababbabbabbbababbaabaabaababaaba").
true ?
yes
| ?- s("baababbabaaaab").
no
| ?- s("bbbbbbbbbbbbbbb").
no

An interesting feature of the older solution is that if you ask the interpreter "are there more solutions?" via use of ; at the true ? prompt (rather than asking "is there any solution" via pressing return at the prompt, like I did above), it returns "true" a number of times equal to the number of different ways the string can be expressed in the given form (e.g. it returns "true" twice with s("aaaa")., as this can be parsed as (a a)(a a) or as (aa aa)).

Prolog programs are often reversible (allowing s to generate a list of strings with the given property). The older one isn't (it goes into an infinite loop), but that's because of the golfed method I used to ensure that C is nonempty; if you rewrite the program to specify C as nonempty explicitly, it generates strings of the form "aa", "aabb", "aabbcc", and so on (Prolog being Prolog, it doesn't specify identities for the characters that make them up, just a specification of which characters are the same). The newer one generates strings of the form "aa", "abab", "abcabc", and so on; this is an infinite loop in its own right, and thus never hits the point at which it'd get stuck due to failing to detect a zero-length string.


答:
Dyalog APL, <s>29</s> 28 bytes

⌈/¨({∪¨,/∘.{⍵/⍨≢⍺∩⍵}⍨⍵}⍣≡,¨)

Same idea as the Pyth solution.

Title: Array unification


问:
Generate a Markdown Template for your Post
Your task is simple: Write a program (or function) that takes no input and outputs something like this:

```<code>## *name*, *length* bytes
    *code*
</code>```

Where *name* is the name of the language you are using, *length* is the number of bytes in your code, and *code* is your program's source code. If *code* contains multiple lines, it have four spaces before each line.

Here's a 124-byte example implementation in Python 3:

```<code>s = "## Python 3, 124 bytes{2}    s = {1}{0}{1}{2}print(s.format(s,chr(34),chr(10)))"
print(s.format(s,chr(34),chr(10)))
</code>```

The output is:

```<code>## Python 3, 124 bytes
    s = "## Python 3, 124 bytes{2}    s = {1}{0}{1}{2}print(s.format(s,chr(34),chr(10)))"
    print(s.format(s,chr(34),chr(10)))
</code>```

Which in Markdown is:

Python 3, 124 bytes

```<code>s = "## Python 3, 124 bytes{2}    s = {1}{0}{1}{2}print(s.format(s,chr(34),chr(10)))"
print(s.format(s,chr(34),chr(10)))
</code>```

This is code-golf, so the shortest answer (in bytes) wins.

答:
Underload, 48 bytes

```<code>(#Underload, 48 bytes
)(~:S(    ):S*aSaS(:^)S):^
</code>```

Body:
Underload, 48 bytes

(#Underload, 48 bytes
)(~:S(    ):S*aSaS(:^)S):^


问:
Probability of All Combinations of Given Events
Given a sequences of events with probabilities between 0.0 and 1.0, generate and derive the probability of each combination occurring. You may presume that a sequence of numbers is provided in whatever construct your chosen language provides.

Here's an example; you may presume that the length of the sequence's combinations fit into memory:

```<code>{ 0.55, 0.67, 0.13 }
</code>```

The program shall print each combination and the associated probability of that sequence occurring. A 1 shall denote that the event in that index of the input sequence occurred and a 0 shall denote that that event did not occur. The desired output is below (I don't care about printing the work, that's just for informational purposes of the algorithm):

```<code>[0,0,0] = (1 - 0.55) * (1-0.67) * (1-0.13) = 0.129195
[0,0,1] = (1 - 0.55) * (1-0.67) * (0.13)   = 0.019305
[0,1,0] = (1 - 0.55) * (0.67)   * (1-0.13) = 0.262305
[0,1,1] = (1 - 0.55) * (0.67)   * (0.13)   = 0.039195
[1,0,0] = (0.55)     * (1-0.67) * (1-0.13) = 0.157905
[1,0,1] = (0.55)     * (1-0.67) * (0.13)   = 0.023595
[1,1,0] = (0.55)     * (0.67)   * (1-0.13) = 0.320595
[1,1,1] = (0.55)     * (0.67)   * (0.13)   = 0.047905
</code>```

This problem is tangentially related to calculating a "Cartesian product".

Remember, this is code-golf, so the code with the fewest number of bytes wins.

答:
Perl 6, <s>24</s> 19 bytes of Latin-1

```<code>{[*] 1 «-»@_ «|»@_}
</code>```

Older code:

```<code>{[*] map {1-$^a|$^a},@_}
</code>```

This is a function. Use it like this:

```<code>{[*] 1 «-»@_ «|»@_}(0.55, 0.67, 0.13)
</code>```

to get:

```<code>any(any(any(0.129195, 0.019305), any(0.262305, 0.039195)), any(any(0.157905, 0.023595), any(0.320595, 0.047905)))
</code>```

Explanation of the older code:

```<code>[*]          multiply together all array elements
map          but first transform each element via
{1-$^a|$^a}  considering both 1 minus the value and the value
,@_          of the function input
</code>```

The newer code is basically the same, just using terser syntax:

```<code>[*]          multiply together all array elements
1 «-»@_      of the array formed by subtracting the argument from 1
«|»@_        pointwise considering both that and the original array
</code>```

The map generates an array full of any constructs, which multiply into larger any constructs, neatly solving the problem without even needing a loop.

Not the shortest language for the program, but it's a very direct translation of the problem.

Body:
Perl 6, <s>24</s> 19 bytes of Latin-1

{[*] 1 «-»@_ «|»@_}

Older code:

{[*] map {1-$^a|$^a},@_}

This is a function. Use it like this:

{[*] 1 «-»@_ «|»@_}(0.55, 0.67, 0.13)

to get:

any(any(any(0.129195, 0.019305), any(0.262305, 0.039195)), any(any(0.157905, 0.023595), any(0.320595, 0.047905)))

Explanation of the older code:

[*]          multiply together all array elements
map          but first transform each element via
{1-$^a|$^a}  considering both 1 minus the value and the value
,@_          of the function input

The newer code is basically the same, just using terser syntax:

[*]          multiply together all array elements
1 «-»@_      of the array formed by subtracting the argument from 1
«|»@_        pointwise considering both that and the original array

The map generates an array full of any constructs, which multiply into larger any constructs, neatly solving the problem without even needing a loop.

Not the shortest language for the program, but it's a very direct translation of the problem.


问:
Code ladder, Cops

Note: This challenge is finished. Submissions are still welcome but can not win.

This is the cops' thread. The robbers' thread goes here.

Write a code that outputs the integer 1. If you add, remove or substitute a single character (of your choosing), the code should output the integer 2. Change one more character (the same or another), and the code should output 3. Continue like this as far as you can, but maximum up to 10. Default output formats such as ans = 1 are accepted. You can ignore output to STDERR (or equivalent).

You must reveal the language, byte count of your initial code, the number of integers it works for, as well as an optional number of characters of the initial code. Note: You don't have to reveal any characters, but remember that revealing characters might make it harder for the robbers as they must use the same character in the same position. You can choose which character you use to denote unrevealed characters (for instance underscore), but make sure to specify this.

Cops can provide the uncracked code after one week and call the submission "SAFE". The winning submission will be the shortest uncracked submission that produces the number 10. If no uncracked submissions are able to print 10, the shortest code that produces 9 will win, and so on. Note that the robbers don't have to make the same changes as you do, and they don't have to reproduce the exact code (unless you reveal all characters). They must only reproduce the output.

Submissions posted later than November 24th are welcome but not eligible for the win (because there will likely be fewer robbers around).

Example post:

The following post is a submission in the language MyLang, it is 9 bytes long, and it works for numbers 1 - 8.

MyLang, 9 bytes, 8 numbers

This submission works for 1 - 8. Unrevealed characters are indicated with an underscore: _.

```<code>abc____i
</code>```

Leaderboard

Disclaimer: The leaderboard is not tested and uncracked submissions might not appear in the list.

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/Sites/codegolf/all.css?v=7509797c03ea">

Uncracked submissions

 Language	 Score	 User

Sort by: score creation

Safe submissions

 Language	 Score	 User

```

答:
Retina, 2 bytes, 10 numbers, Cracked

```<code>_1
</code>```

Works for 1 to 10, _ is a hidden character. This shouldn't be too hard, but I hope it provides a somewhat interesting puzzle. :)

You can try Retina online over here.

Title: Code ladder, Cops

Body:
Retina, 2 bytes, 10 numbers, Cracked

_1

Works for 1 to 10, _ is a hidden character. This shouldn't be too hard, but I hope it provides a somewhat interesting puzzle. :)

You can try Retina online over here.


答:
Haskell, 86 bytes, cracked by nimi

putStr$"Study:ric====>>>>yummy:candy:circus:party:in:syrirrr!!!!!!$[;['=['[$]']='];]$"
```
<p>This a valid Haskell expression which prints:</p>
<pre class="lang-haskell prettyprint-override"><code>Study:ric====>>>>yummy:candy:circus:party:in:syrirrr!!!!!!$[;['=['[$]']='];]$
</code>```

So if Ric studies, he can go to the yummy candy circus party! That is, if he figures out where Syrirrr is.

Title: Quine Anagrams! (Cops' Thread)

Body:
This is the cops' thread. For the robbers' thread, click here.

Cops' Task

First, write a quine in a language of your choosing.

Next, scramble the quine. Make sure to do this well as the robbers will be trying to unscramble it and find the original source code! Note that the scrambled code does not need to work.

Post an answer on this thread. Include the language, the byte count, and the scrambled code.

Your program may not print to STDERR.

Here is an example of a cop submission:

Python, 29 bytes

```<code>nt _%=_r;_riinp;pr_='t _%%%_'
</code>```

Robbers' Task

For the robbers' thread, click here.

Safe Submissions

If your submission has not yet been cracked after a week of posting, you may add the solution and specify that it is safe. If you do not, your submission may still be cracked.

Scoring

This is code-golf, so the user with the safe submission with the fewest bytes will be the winner of this section.

Leaderboard

Here is a stack snippet to generate a learderboard for this challenge. For it to display properly, please format your submission like this:

```<code># Language Name, N bytes

... other stuff ...
</code>```

If your submission gets cracked, please format like this:

```<code># Language Name, N bytes, [Cracked!](link)

... other stuff ...
</code>```

If your submission is safe, format like this:

```<code># Language Name, N bytes, Safe!

... other stuff ...
</code>```

```

Body:
Haskell, 86 bytes, cracked by nimi

putStr$"Study:ric====>>>>yummy:candy:circus:party:in:syrirrr!!!!!!$[;['=['[$]']='];]$"

This a valid Haskell expression which prints:

Study:ric====>>>>yummy:candy:circus:party:in:syrirrr!!!!!!$[;['=['[$]']='];]$

So if Ric studies, he can go to the yummy candy circus party! That is, if he figures out where Syrirrr is.


答:
Python, 522 bytes

a = [-2,4,-2,3,2,4,1,1]
b = [-2,4,1,2,2,3,1,-2]
m = {}
visited = {}
for i in range(len(a)):
    if a[i] in m:
        if b[i] not in m[a[i]]:
            m[a[i]].append(b[i])
    else:
        l = []
        l.append(b[i])
        m[a[i]] = l
    if b[i] in m:
        if a[i] not in m[b[i]]:
            m[b[i]].append(a[i])
    else:
        l = []
        l.append(a[i])
        m[b[i]] = l

def dfs(v, maximum):
    if v > maximum:
        maximum = v
    visited[v] = True
    for n in m[v]:
        if not visited[n]:
            d = dfs(n, maximum)
            if d > v:
                maximum = d
    return maximum

result = []
for k in range(len(a)):
    for q in m:
        visited[q] = False
    result.append(max(dfs(a[k], a[k]), dfs(b[k], b[k])))

print(result)
```
<p><strong>Explanation</strong></p>
<p>Make a table of values corresponding to each unique element in in both arrays (<code>a</code> and <code>b</code> in this case). For example if</p>
```a = [0,1,0]
b = [2,1,0]
```
<p>then the table would be:</p>
```0:[0,2]
1:[1]
2:[0]
```
<p>then apply depth first search, so, for example, assume I pick the leftmost element in <code>a</code> the value is then <code>0</code> and <code>0</code> has the equivalences: <code>0</code> and <code>2</code>. Since <code>0</code> has already been visited, go to <code>2</code>. 2 has the equivalences: <code>0</code>. So the best result for choosing the leftmost element in <code>a</code> is <code>2</code>.
Here's the tree:</p>
```   0
 /   \
0     2
       \
        0
```

and you want to take the largest value in there, so the result is 2.

Title: Array unification

Body:
Python, 522 bytes

a = [-2,4,-2,3,2,4,1,1]
b = [-2,4,1,2,2,3,1,-2]
m = {}
visited = {}
for i in range(len(a)):
    if a[i] in m:
        if b[i] not in m[a[i]]:
            m[a[i]].append(b[i])
    else:
        l = []
        l.append(b[i])
        m[a[i]] = l
    if b[i] in m:
        if a[i] not in m[b[i]]:
            m[b[i]].append(a[i])
    else:
        l = []
        l.append(a[i])
        m[b[i]] = l

def dfs(v, maximum):
    if v > maximum:
        maximum = v
    visited[v] = True
    for n in m[v]:
        if not visited[n]:
            d = dfs(n, maximum)
            if d > v:
                maximum = d
    return maximum

result = []
for k in range(len(a)):
    for q in m:
        visited[q] = False
    result.append(max(dfs(a[k], a[k]), dfs(b[k], b[k])))

print(result)

Explanation

Make a table of values corresponding to each unique element in in both arrays (a and b in this case). For example if

a = [0,1,0]
b = [2,1,0]

then the table would be:

0:[0,2]
1:[1]
2:[0]

then apply depth first search, so, for example, assume I pick the leftmost element in a the value is then 0 and 0 has the equivalences: 0 and 2. Since 0 has already been visited, go to 2. 2 has the equivalences: 0. So the best result for choosing the leftmost element in a is 2.
Here's the tree:

   0
 /   \
0     2
       \
        0

and you want to take the largest value in there, so the result is 2.


问:
Wait... what was I going to say again?
I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this?

Requirements:

The program must loop as follows:

First, take in input

If the input is empty, print the last stored question.

Otherwise, store the input as a question.

Notes:

The input will never be empty if there are no questions stored.

Clarification: The program does not need to store multiple questions. I originally wanted it to store multiple, but I changed it after many people misunderstood the question.

Remember, this is code-golf, so the code with the smallest number of bytes wins.

答:
sed, 10 bytes

```<code>/./{x;d};g
</code>```

Explanation:

```<code>      (implicit at start of program) read input, overwriting old input
/./{  If the input is nonempty
  x;  swap the input with the hold space
  d   then restart, without any implicit printing of input
};    end if statement
g     Append the hold space to the [empty] input
      (implicit at end of program) print the input, then restart
</code>```

Nice to see an exoteric (i.e. "not esoteric") language tying with some of the golfing languages!

Title: Wait... what was I going to say again?

Body:
sed, 10 bytes

/./{x;d};g

Explanation:

      (implicit at start of program) read input, overwriting old input
/./{  If the input is nonempty
  x;  swap the input with the hold space
  d   then restart, without any implicit printing of input
};    end if statement
g     Append the hold space to the [empty] input
      (implicit at end of program) print the input, then restart

Nice to see an exoteric (i.e. "not esoteric") language tying with some of the golfing languages!


问:
Taxicab in San Francisco
You are a taxicab driver in San Francisco. As is typical of taxicab drivers, you are navigating a grid where the only valid directions you can move are the left, right, up, and down. However, San Fransisco is very hilly so the distance between two adjacent intersections is not necessarily the same. More specifically, the distance between an intersection at altitude a and an adjacent intersection at altitude b would be 1 + |a - b|. Your goal is to find all the shortest paths from your origin at the top left of the map to your destination at the bottom right.

Input

A two-dimensional grid of integer altitudes in whichever format is most convenient (two-dimensional array, one-dimensional array with width and/or height, etc.).

Output

A sequence of directions to travel to arrive at the bottom right corner of the input from the top left in the shortest distance possible given the distance between two adjacent intersections of altitudes a and b is given by the formula 1 + |a - b|. If there are multiple solutions output all solutions.

Though I use U, D, L, and R for up, down, left, and right in the examples below your program may use any four distinct strings to represent the directions so long as it is consistent with them in and across all inputs.

Examples

```<code>Input:
0 3 0 0 0
0 2 0 2 0
0 0 0 3 0
Output:
D D R R U U R R D D

Input:
3
Output:
<empty>

Input:
11 11 11
11 11 11
11 11 11
Output:
R R D D
R D R D
R D D R
D R R D
D R D R
D D R R

Input:
7 8 1 -1 0
4 4 6 -1 7
3 4 4  2 8
2 5 2 -1 2
Output:
D R D R R D R
D R D R D R R
</code>```

This is code-golf so the answer with the shortest byte count wins.

答:
JavaScript (ES6), <s>228</s> <s>212</s> <s>200</s> 194 bytes

a=>w=>(B=1/0,(F=(r,p,s,b=a[p])=>p-a.length+1?1/b&&([...a[p]='RDUL'].map((c,d)=>d|p%w<w-1&&d-3|p%w&&F(r+c,P=p+[1,w,-w,-1][d],s+1+Math.abs(b-a[P]))),a[p]=b):R=s>B?R:s<B?(B=s,r):R+' '+r)('',0,0),R)
```

<h3>Input</h3>

<p>One-dimensional array <code>a</code> and width <code>w</code> in currying syntax <code>(a)(w)</code></p>

<h3>Output</h3>

<p>A space-separated list of solutions such as <code>"DRDRRDR DRDRDRR"</code></p>

<h3>Formatted and commented</h3>

<pre class="lang-js prettyprint-override"><code>a => w => (                            // given an array 'a' and a width 'w'
  B = 1 / 0,                           // B = best score so far, initialized as +Infinity
  (                                    //
    F = (                              // F = recursive function with:
      r,                               //   - r = current path (string)
      p,                               //   - p = current position in grid
      s,                               //   - s = current score
      b = a[p]                         //   - b = backup of current cell
    ) =>                               //
    p - a.length + 1 ?                 // if we haven't reached our destination:
      1 / b && (                       //   if the current cell is valid:
        [...a[p] = 'RDUL']             //     invalidate the current cell
        .map((c, d) =>                 //     for each possible direction:
          d | p % w < w - 1 &&         //       check right boundary
          d - 3 | p % w &&             //       check left boundary
          F(                           //       do a recursive call with:
            r + c,                     //         - new direction appended to the path
            P = p + [1, w, -w, -1][d], //         - updated position
            s + 1 + Math.abs(b - a[P]) //         - updated score
          )                            //
        ),                             //
        a[p] = b                       //     restore current cell value
      )                                //
    :                                  // else:
      R = s > B ?                      //   if the current score is worse than B:
        R                              //     keep the previous solution
      : s < B ?                        //   if the current score is better than B:
        (B = s, r)                     //     update best score / store path as new solution
      : R + ' ' + r                    //   if it's just as good: append path to solution
  )('', 0, 0),                         // initial call to F with r = '', p = 0, s = 0
  R                                    // return solution
)                                      //
</code>```

Test cases

let f =

a=>w=>(B=1/0,(F=(r,p,s,b=a[p])=>p-a.length+1?1/b&&([...a[p]='RDUL'].map((c,d)=>d|p%w<w-1&&d-3|p%w&&F(r+c,P=p+[1,w,-w,-1][d],s+1+Math.abs(b-a[P]))),a[p]=b):R=s>B?R:s<B?(B=s,r):R+' '+r)('',0,0),R)

console.log(f([
  0, 3, 0, 0, 0,
  0, 2, 0, 2, 0,
  0, 0, 0, 3, 0
])(5));

console.log(f([
  3
])(1));

console.log(f([
  11, 11, 11,
  11, 11, 11,
  11, 11, 11
])(3));

console.log(f([
  7, 8, 1, -1, 0,
  4, 4, 6, -1, 7,
  3, 4, 4,  2, 8,
  2, 5, 2, -1, 2
])(5));```

Title: Taxicab in San Francisco

Body:
JavaScript (ES6), <s>228</s> <s>212</s> <s>200</s> 194 bytes

a=>w=>(B=1/0,(F=(r,p,s,b=a[p])=>p-a.length+1?1/b&&([...a[p]='RDUL'].map((c,d)=>d|p%w<w-1&&d-3|p%w&&F(r+c,P=p+[1,w,-w,-1][d],s+1+Math.abs(b-a[P]))),a[p]=b):R=s>B?R:s<B?(B=s,r):R+' '+r)('',0,0),R)

Input

One-dimensional array a and width w in currying syntax (a)(w)

Output

A space-separated list of solutions such as "DRDRRDR DRDRDRR"

Formatted and commented

a => w => (                            // given an array 'a' and a width 'w'
  B = 1 / 0,                           // B = best score so far, initialized as +Infinity
  (                                    //
    F = (                              // F = recursive function with:
      r,                               //   - r = current path (string)
      p,                               //   - p = current position in grid
      s,                               //   - s = current score
      b = a[p]                         //   - b = backup of current cell
    ) =>                               //
    p - a.length + 1 ?                 // if we haven't reached our destination:
      1 / b && (                       //   if the current cell is valid:
        [...a[p] = 'RDUL']             //     invalidate the current cell
        .map((c, d) =>                 //     for each possible direction:
          d | p % w < w - 1 &&         //       check right boundary
          d - 3 | p % w &&             //       check left boundary
          F(                           //       do a recursive call with:
            r + c,                     //         - new direction appended to the path
            P = p + [1, w, -w, -1][d], //         - updated position
            s + 1 + Math.abs(b - a[P]) //         - updated score
          )                            //
        ),                             //
        a[p] = b                       //     restore current cell value
      )                                //
    :                                  // else:
      R = s > B ?                      //   if the current score is worse than B:
        R                              //     keep the previous solution
      : s < B ?                        //   if the current score is better than B:
        (B = s, r)                     //     update best score / store path as new solution
      : R + ' ' + r                    //   if it's just as good: append path to solution
  )('', 0, 0),                         // initial call to F with r = '', p = 0, s = 0
  R                                    // return solution
)                                      //

Test cases

let f =

a=>w=>(B=1/0,(F=(r,p,s,b=a[p])=>p-a.length+1?1/b&&([...a[p]='RDUL'].map((c,d)=>d|p%w<w-1&&d-3|p%w&&F(r+c,P=p+[1,w,-w,-1][d],s+1+Math.abs(b-a[P]))),a[p]=b):R=s>B?R:s<B?(B=s,r):R+' '+r)('',0,0),R)

console.log(f([
  0, 3, 0, 0, 0,
  0, 2, 0, 2, 0,
  0, 0, 0, 3, 0
])(5));

console.log(f([
  3
])(1));

console.log(f([
  11, 11, 11,
  11, 11, 11,
  11, 11, 11
])(3));

console.log(f([
  7, 8, 1, -1, 0,
  4, 4, 6, -1, 7,
  3, 4, 4,  2, 8,
  2, 5, 2, -1, 2
])(5));


问:
Quine Anagrams! (Robbers' Thread)
This is the robbers' thread. For the cops' thread, click here.

Cops' Task

For the cops' thread, click here.

Robbers' Task

Find an uncracked submission on the cops' thread. (A submission may only be cracked once.)

Unscramble the code to find a working quine.

Post an answer on the robbers' thread. Include the language, the byte count, the user who posted the scrambled code, a link to that answer, and the unscrambled code.

Here is an example of a robber submission:

Python, 29 bytes, Oliver

```<code>_='_=%r;print _%%_';print _%_
</code>```

Scoring

The user with the most cracks will be the winner of this section.

答:
Python 2, 54 bytes, Loojvo

```<code>l= ['l=', ';print l[0],`l`,l[1]'] ;print l[0],`l`,l[1]
</code>```

Had a hard time finding it, as I have basically almost never touched python

Title: Quine Anagrams! (Robbers' Thread)

Body:
Python 2, 54 bytes, Loojvo

l= ['l=', ';print l[0],`l`,l[1]'] ;print l[0],`l`,l[1]

Had a hard time finding it, as I have basically almost never touched python


问:
Add weight to one side of a see-saw to balance it

Balancing Act

A see-saw (supposedly from the French 'ci-ça', meaning 'this-that') forms a third of the holy trinity of playground equipment, along with the similarly ubiquitous slide and swing. A see-saw is in perfect balance if, and only if, the sum of the moments on each side are equivalent. A see-saw can therefore be balanced by adding a specific quantity of weight to the side with the lower moment sum; achieving this is your goal for this challenge.

Challenge

Your challenge is to take a depiction of a see-saw as input and output it again, with weight added to one end of the see-saw to balance it.

Input

Your program must take, in any reasonable format, an ASCII see-saw such as the following:

```<code>100             100
-------------------
         ^
</code>```

The first line contains two numbers, each representing weights on the see-saw. Exactly one weight is present on each side, each acting on the very end of its side of the plank. Weights are guaranteed to be integers, and always align with their corresponding end of the plank. These numbers will never overlap the fulcrum (^).

The second line represents the 'plank' of the see-saw. Each dash (-) represents an equal length to each other dash, with the sole exception of the dash directly over the fulcrum (^), which has no length.

The third line represents the fulcrum of the see-saw. This fulcrum is marked by the only character that is not a space on this line, a circumflex ('^'). The fulcrum can be positioned anywhere along the length of the plank in a valid input so long as enough space is left so that the numbers representing weights do not overlap the fulcrum in either the input or the output.

The input is guaranteed to have three lines, and have no white-space prior to or after the characters that constitute the see-saw (excepting, of course, the third line, which requires it).

Output

For output, the same see-saw depiction should be printed to stdout, but with one (and only one) of the weights replaced with a larger weight, so as to balance the see-saw. Inputs are guaranteed to make this possible using integers alone. Therefore, weights must be shown without decimal points or any other similar notations. If your language does not use stdout you should go by community / meta consensus on output. Trailing newlines are fine but any other changes to the depiction format are probably not OK.

Exemplification

Test Inputs and Corresponding Outputs

Input 1

```<code>12                22
--------------------
             ^
</code>```

Output 1

```<code>12                26
--------------------
             ^
</code>```

Input 2

```<code>42       42
-----------
     ^
</code>```

Output 2

```<code>42       42
-----------
     ^
</code>```

Input 3

```<code>3             16
----------------
        ^
</code>```

Output 3

```<code>14            16
----------------
        ^
</code>```

Input 4

```<code>1                56
-------------------
    ^
</code>```

Output 4

```<code>196              56
-------------------
    ^
</code>```

Reference Implementation - Python 3

```<code># Takes a list of strings as input
def balance_seesaw(lines):
    weights = [int(w.strip()) for w in lines[0].split()]

    length  = len(lines[1])
    pivot   = lines[2].find("^")
    left_length    = pivot
    right_length   = length - 1 - pivot

    left_torque  = weights[0] * left_length
    right_torque = weights[1] * right_length

    if left_torque > right_torque:
        weights[1] = left_torque // right_length
    elif right_torque > left_torque:
        weights[0] = right_torque // left_length

    weights = [str(w) for w in weights]

    string_gap = " " * (length - sum(len(w) for w in weights))
    lines[0] = weights[0] + string_gap + weights[1]

    print("\n".join(lines))

balance_seesaw(["1                56",
                "-------------------",
                "    ^              "])
</code>```

Rules

This is code-golf, so the shortest code wins counted in bytes. Check meta if counting bytes is awkward in your language.

Standard rules/loopholes apply.

Input must be taken in a reasonable format. A non-exhaustive list of appropriate formats are given as follows:

A single string with lines separated by newline characters

A list of strings, each string represented a line

A 2D Array or Matrix of characters

Related Challenges

Balance a set of weights on a see-saw - Proposed Aug 2015 by samgak

答:
05AB1E, 60 51 50 49 47 45 bytes

Saved 10 bytes thanks to Emigna and 1 byte thanks to Adnan.

All input lines must have the same amount of characters.

```<code>#õKD³'^¡€gDŠ*¬-Os÷1®‚*D0›*+¬?DJg²gs-ð×?¤,²,³,

#                                             Split the first input line on spaces
 õKD                                          Push [first weight, second weight] twice
    ³'^¡€gD                                   Push both lengths from either side of the pivot '^' as an array [left, right] twice
           Š*                                 Multiply by weights to get torque
             ¬-O                              Evaluate rightTorque-leftTorque
                s÷                            Divide by each side's length to get the weights to add: [deltaLeft, deltaRight], keep integer values
                  1®‚                         Push [1,-1]
                     *D                       Yield [deltaLeft, -deltaRight]
                       0›*                    Replace the negative value by 0
                          +                   Add weights: old + deltaWeight
                           ¬?                 Print left weight
                             DJg              Take the size of total decimal representation
                                ²gs-ð×?       Print a string composed of filler spaces between both new weights
                                       ¤,     Print right weight and newline
                                         ²,³, Print the last two lines from input (unchanged)
</code>```

Try it online!

There should be a rule of thumb, like "if your 05AB1E code is longer than 40 bytes, you're probably doing it wrong".
It seems so golfable, any idea is welcome!

Body:
05AB1E, 60 51 50 49 47 45 bytes

Saved 10 bytes thanks to Emigna and 1 byte thanks to Adnan.

All input lines must have the same amount of characters.

#õKD³'^¡€gDŠ*¬-Os÷1®‚*D0›*+¬?DJg²gs-ð×?¤,²,³,

#                                             Split the first input line on spaces
 õKD                                          Push [first weight, second weight] twice
    ³'^¡€gD                                   Push both lengths from either side of the pivot '^' as an array [left, right] twice
           Š*                                 Multiply by weights to get torque
             ¬-O                              Evaluate rightTorque-leftTorque
                s÷                            Divide by each side's length to get the weights to add: [deltaLeft, deltaRight], keep integer values
                  1®‚                         Push [1,-1]
                     *D                       Yield [deltaLeft, -deltaRight]
                       0›*                    Replace the negative value by 0
                          +                   Add weights: old + deltaWeight
                           ¬?                 Print left weight
                             DJg              Take the size of total decimal representation
                                ²gs-ð×?       Print a string composed of filler spaces between both new weights
                                       ¤,     Print right weight and newline
                                         ²,³, Print the last two lines from input (unchanged)

Try it online!

There should be a rule of thumb, like "if your 05AB1E code is longer than 40 bytes, you're probably doing it wrong".
It seems so golfable, any idea is welcome!


问:
Identify the IP address
Identify whether an IP address is internal, global, link-local, or reserved.

Input should be an IPv4 address in decimal octets separated by periods.

Output should be 0 for link-local (RFC 3927), 1 for internal (RFC 1918), 2 for global IPs (Internet), and 3 for otherwise reserved addresses.

All these address types are described in RFC 5735:

Global and Other Specialized Address Blocks

0.0.0.0/8 - Addresses in this block refer to source hosts on "this"    network.  Address 0.0.0.0/32 may be used as a source address for this
host on this network; other addresses within 0.0.0.0/8 may be used to
refer to specified hosts on this network ([RFC1122], Section
3.2.1.3).

10.0.0.0/8 - This block is set aside for use in private networks.    Its intended use is documented in [RFC1918].  As described in that

RFC, addresses within this block do not legitimately appear on the

public Internet.  These addresses can be used without any

coordination with IANA or an Internet registry.

127.0.0.0/8 - This block is assigned for use as the Internet host    loopback address.  A datagram sent by a higher-level protocol to an

address anywhere within this block loops back inside the host.  This

is ordinarily implemented using only 127.0.0.1/32 for loopback.  As

described in [RFC1122], Section 3.2.1.3, addresses within the entire
127.0.0.0/8 block do not legitimately appear on any network anywhere.

169.254.0.0/16 - This is the "link local" block.  As described in    [RFC3927], it is allocated for communication between hosts on a

single link.  Hosts obtain these addresses by auto-configuration,

such as when a DHCP server cannot be found.

172.16.0.0/12 - This block is set aside for use in private networks.    Its intended use is documented in [RFC1918].  As
described in that    RFC, addresses within this block do not
legitimately appear on the    public Internet.  These addresses can be
used without any    coordination with IANA or an Internet registry.

192.0.0.0/24 - This block is reserved for IETF protocol assignments.    At the time of writing this document, there are no
current    assignments.  Allocation policy for future assignments is
given in    [RFC5736].

192.0.2.0/24 - This block is assigned as "TEST-NET-1" for use in    documentation and example code.  It is often used in conjunction with
domain names example.com or example.net in vendor and protocol

documentation.  As described in [RFC5737], addresses within this

block do not legitimately appear on the public Internet and can be

used without any coordination with IANA or an Internet registry.  See
[RFC1166].

192.88.99.0/24 - This block is allocated for use as 6to4 relay    anycast addresses, in [RFC3068].  In contrast with previously

described blocks, packets destined to addresses from this block do

appear in the public Internet.  [RFC3068], Section 7, describes

operational practices to prevent the malicious use of this block in

routing protocols.

192.168.0.0/16 - This block is set aside for use in private networks.    Its intended use is documented in [RFC1918].  As
described in that    RFC, addresses within this block do not
legitimately appear on the    public Internet.  These addresses can be
used without any    coordination with IANA or an Internet registry.

198.18.0.0/15 - This block has been allocated for use in benchmark    tests of network interconnect devices.  [RFC2544] explains that this

range was assigned to minimize the chance of conflict in case a

testing device were to be accidentally connected to part of the

Internet.  Packets with source addresses from this range are not

meant to be forwarded across the Internet.

198.51.100.0/24 - This block is assigned as "TEST-NET-2" for use in    documentation and example code.  It is often used in conjunction with
domain names example.com or example.net in vendor and protocol

documentation.  As described in [RFC5737], addresses within this

block do not legitimately appear on the public Internet and can be

used without any coordination with IANA or an Internet registry.

203.0.113.0/24 - This block is assigned as "TEST-NET-3" for use in    documentation and example code.  It is often used in conjunction with
domain names example.com or example.net in vendor and protocol

documentation.  As described in [RFC5737], addresses within this

block do not legitimately appear on the public Internet and can be

used without any coordination with IANA or an Internet registry.

224.0.0.0/4 - This block, formerly known as the Class D address    space, is allocated for use in IPv4 multicast address assignments.

The IANA guidelines for assignments from this space are described in

[RFC3171].

240.0.0.0/4 - This block, formerly known as the Class E address    space, is reserved for future use; see [RFC1112], Section 4.

The one exception to this is the "limited broadcast" destination

address 255.255.255.255.  As described in [RFC0919] and [RFC0922],

packets with this destination address are not forwarded at the IP

layer.

4.  Summary Table

```<code>Address Block       Present Use                Reference
0.0.0.0/8           "This" Network             RFC 1122, Section 3.2.1.3
10.0.0.0/8          Private-Use Networks       RFC 1918
127.0.0.0/8         Loopback                   RFC 1122, Section 3.2.1.3
169.254.0.0/16      Link Local                 RFC 3927
172.16.0.0/12       Private-Use Networks       RFC 1918
192.0.0.0/24        IETF Protocol Assignments  RFC 5736
192.0.2.0/24        TEST-NET-1                 RFC 5737
192.88.99.0/24      6to4 Relay Anycast         RFC 3068
192.168.0.0/16      Private-Use Networks       RFC 1918
198.18.0.0/15       Network Interconnect
                    Device Benchmark Testing   RFC 2544
198.51.100.0/24     TEST-NET-2                 RFC 5737
203.0.113.0/24      TEST-NET-3                 RFC 5737
224.0.0.0/4         Multicast                  RFC 3171
240.0.0.0/4         Reserved for Future Use    RFC 1112, Section 4
255.255.255.255/32  Limited Broadcast          RFC 919, Section 7
                                               RFC 922, Section 7
</code>```

Rules

Standard loopholes apply.

This is code-golf, shortest answer wins.

答:
Batch, 356 bytes

```<code>@echo off
set s=%1
if not %s==%s:.=% %0 %s:.= %
if %1.%2==169.254 exit/b0
if %1==10 exit/b1
if %1.%2==172.16 if %3 lss 32 exit/b1
if %1.%2==192.168 exit/b1
if %1==0 exit/b3
if %1==127 exit/b3
if %1 geq 224 exit/b3
for %%a in (18 19)do if %1.%2==192.%a exit/b3
for %%a in (192.0.0 192.0.2 198.51.100 203.0.113)do if %1.%2.%3==%%a exit/b3
exit/b2
</code>```

Takes input as a command-line parameter and returns the result by setting the errorlevel.

Title: Identify the IP address

Body:
Batch, 356 bytes

@echo off
set s=%1
if not %s==%s:.=% %0 %s:.= %
if %1.%2==169.254 exit/b0
if %1==10 exit/b1
if %1.%2==172.16 if %3 lss 32 exit/b1
if %1.%2==192.168 exit/b1
if %1==0 exit/b3
if %1==127 exit/b3
if %1 geq 224 exit/b3
for %%a in (18 19)do if %1.%2==192.%a exit/b3
for %%a in (192.0.0 192.0.2 198.51.100 203.0.113)do if %1.%2.%3==%%a exit/b3
exit/b2

Takes input as a command-line parameter and returns the result by setting the errorlevel.


问:
Code ladder, Robbers
This is the robbers' thread. The cops' thread goes here.

Write a code that has the same number of bytes as the cop post and where the revealed characters are identical. The code must produce 1 in its initial state, and produce the numbers 2, 3 .. when single alterations are made.

The winner will be the robber that cracked the most posts.

Example post:

MyLang, 9 bytes, 8 numbers (including link to answer), Cop's username.

Original code:

```<code>abc1efghi
</code>```

Code that produces 1 - 8:

```<code>1: abc1efghi
2: abc2efghi
3: abc2efghij
4: kbc2efghij
5: kbc23fghij
6: kbc23fghi
7: kbc63fghi
8: kbc63fhi
</code>```

Explanations are encouraged. The exact format of the robber post is optional.

答:
Retina, 2 bytes, 10 numbers, by Martin Ender.

Original code:

```

1
```

This replaces the empty input by the number 1.

Code that produces 1 - 10 (showing newlines as \n for convenience):

```<code>1 : \n1
2 : \n1\n
3 : \n11\n
4 : \n111\n
5 : \n1111\n
6 : \n11111\n
7 : \n111111\n
8 : \n1111111\n
9 : \n11111111\n
10: \n111111111\n
</code>```

For 2 and onwards, we count the number of empty strings in the previous stage. For 2, there is an empty string before and after the 1. For 3 there is an empty string before the ones, in between the ones and after the ones. This works all the way up to 10.

Try it online

Title: Code ladder, Robbers

Body:
Retina, 2 bytes, 10 numbers, by Martin Ender.

Original code:

1

This replaces the empty input by the number 1.

Code that produces 1 - 10 (showing newlines as \n for convenience):

1 : \n1
2 : \n1\n
3 : \n11\n
4 : \n111\n
5 : \n1111\n
6 : \n11111\n
7 : \n111111\n
8 : \n1111111\n
9 : \n11111111\n
10: \n111111111\n

For 2 and onwards, we count the number of empty strings in the previous stage. For 2, there is an empty string before and after the 1. For 3 there is an empty string before the ones, in between the ones and after the ones. This works all the way up to 10.

Try it online


问:
Print/Output the L-phabet
Inspired by George Gibson's Print a Tabula Recta.

You are to print/output this exact text:

```<code>ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ
</code>```

(Yes, I typed that by hand)

You are allowed to use all lowercase instead of all uppercase.

However, your choice of case must be consistent throughout the whole text.

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87064; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}</code>```

<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Title: Print/Output the L-phabet

Body:
Befunge, 55 bytes

:39*%"A"+:"["/99**-,:"d"7*`#@_1+::39*/\39*%`55+*"%"+40p

Try it online!


问:
Find the rate of change at a point on a polynomial
Given the equation of a polynomial and an x-coordinate find the rate of change of the point at that x-coord on the curve.

A polynomial is in the form: axn + axn-1 + ... + ax1 + a, where a ϵ Q and n ϵ W. For this challenge, n can also be 0 if you don't want to have to deal with special cases (constants) where there is no x.

To find the rate of change at that x-coord, we can get the derivative of the polynomial and plug in the x-coord.

Input

The polynomial can be taken in any reasonable form, but you must state what that format is explicitly. For example, an array of the form [..[coefficient, exponent]..] is acceptable.

Output

The rate of change of the point at the x-coord given.

This is code-golf, so shortest code in bytes wins.

Examples

```<code>[[4, 3], [-2, 4], [5, 10]]   19    ->   16134384838410
                  [[0, 4]]  400    ->   0
           [[4, 0], [5,1]]  -13    ->   5
      [[4.14, 4], [48, 2]]   -3    ->   -735.12
         [[1, 3], [-5, 0]]    5.4  ->   87.48
</code>```

Body:
dc, 31 bytes

??sx0[snd1-lxr^**ln+z2<r]srlrxp

Usage:

$ dc -e "??sx0[snd1-lxr^**ln+z2<r]srlrxp"
4.14 4 48 2
_3
-735.12


答:
PHP, <s>212</s> <s>209</s> 205 bytes

probably golfable

```<code>preg_match("#(\d+)( +)(\d+)\s*(-+)[\r\n]+( +)\^#",$s=$argv[1],$m);echo preg_replace("#\d+( +)\d+#",(($r=$m[3])>($q=$m[1]*($p=strlen($m[5]))/(-$p-1+$e=strlen($m[4])))?$r*$e/($p+1)-$q=$r:$m[1]).$m[2].$q,$s);
</code>```

Takes input from command line argument; escape newlines. Run with -r.

Replacing with a placeholder did not work as expected; so I had to add more parens to the first regex.

Title: Add weight to one side of a see-saw to balance it

Body:
Balancing Act

A see-saw (supposedly from the French 'ci-ça', meaning 'this-that') forms a third of the holy trinity of playground equipment, along with the similarly ubiquitous slide and swing. A see-saw is in perfect balance if, and only if, the sum of the moments on each side are equivalent. A see-saw can therefore be balanced by adding a specific quantity of weight to the side with the lower moment sum; achieving this is your goal for this challenge.

Challenge

Your challenge is to take a depiction of a see-saw as input and output it again, with weight added to one end of the see-saw to balance it.

Input

Your program must take, in any reasonable format, an ASCII see-saw such as the following:

```<code>100             100
-------------------
         ^
</code>```

The first line contains two numbers, each representing weights on the see-saw. Exactly one weight is present on each side, each acting on the very end of its side of the plank. Weights are guaranteed to be integers, and always align with their corresponding end of the plank. These numbers will never overlap the fulcrum (^).

The second line represents the 'plank' of the see-saw. Each dash (-) represents an equal length to each other dash, with the sole exception of the dash directly over the fulcrum (^), which has no length.

The third line represents the fulcrum of the see-saw. This fulcrum is marked by the only character that is not a space on this line, a circumflex ('^'). The fulcrum can be positioned anywhere along the length of the plank in a valid input so long as enough space is left so that the numbers representing weights do not overlap the fulcrum in either the input or the output.

The input is guaranteed to have three lines, and have no white-space prior to or after the characters that constitute the see-saw (excepting, of course, the third line, which requires it).

Output

For output, the same see-saw depiction should be printed to stdout, but with one (and only one) of the weights replaced with a larger weight, so as to balance the see-saw. Inputs are guaranteed to make this possible using integers alone. Therefore, weights must be shown without decimal points or any other similar notations. If your language does not use stdout you should go by community / meta consensus on output. Trailing newlines are fine but any other changes to the depiction format are probably not OK.

Exemplification

Test Inputs and Corresponding Outputs

Input 1

```<code>12                22
--------------------
             ^
</code>```

Output 1

```<code>12                26
--------------------
             ^
</code>```

Input 2

```<code>42       42
-----------
     ^
</code>```

Output 2

```<code>42       42
-----------
     ^
</code>```

Input 3

```<code>3             16
----------------
        ^
</code>```

Output 3

```<code>14            16
----------------
        ^
</code>```

Input 4

```<code>1                56
-------------------
    ^
</code>```

Output 4

```<code>196              56
-------------------
    ^
</code>```

Reference Implementation - Python 3

```<code># Takes a list of strings as input
def balance_seesaw(lines):
    weights = [int(w.strip()) for w in lines[0].split()]

    length  = len(lines[1])
    pivot   = lines[2].find("^")
    left_length    = pivot
    right_length   = length - 1 - pivot

    left_torque  = weights[0] * left_length
    right_torque = weights[1] * right_length

    if left_torque > right_torque:
        weights[1] = left_torque // right_length
    elif right_torque > left_torque:
        weights[0] = right_torque // left_length

    weights = [str(w) for w in weights]

    string_gap = " " * (length - sum(len(w) for w in weights))
    lines[0] = weights[0] + string_gap + weights[1]

    print("\n".join(lines))

balance_seesaw(["1                56",
                "-------------------",
                "    ^              "])
</code>```

Rules

This is code-golf, so the shortest code wins counted in bytes. Check meta if counting bytes is awkward in your language.

Standard rules/loopholes apply.

Input must be taken in a reasonable format. A non-exhaustive list of appropriate formats are given as follows:

A single string with lines separated by newline characters

A list of strings, each string represented a line

A 2D Array or Matrix of characters

Related Challenges

Balance a set of weights on a see-saw - Proposed Aug 2015 by samgak

Body:
PHP, <s>212</s> <s>209</s> 205 bytes

probably golfable

preg_match("#(\d+)( +)(\d+)\s*(-+)[\r\n]+( +)\^#",$s=$argv[1],$m);echo preg_replace("#\d+( +)\d+#",(($r=$m[3])>($q=$m[1]*($p=strlen($m[5]))/(-$p-1+$e=strlen($m[4])))?$r*$e/($p+1)-$q=$r:$m[1]).$m[2].$q,$s);

Takes input from command line argument; escape newlines. Run with -r.

Replacing with a placeholder did not work as expected; so I had to add more parens to the first regex.


答:
JavaScript, 30 bytes, 10 numbers, cracked

```<code>alert(Array(_)________.length)
</code>```

Shouldn't be too hard, but hopefully it's just hard enough to provide a challenge. :) Unrevealed characters are marked with _.

Title: Code ladder, Cops

Body:
Note: This challenge is finished. Submissions are still welcome but can not win.

This is the cops' thread. The robbers' thread goes here.

Write a code that outputs the integer 1. If you add, remove or substitute a single character (of your choosing), the code should output the integer 2. Change one more character (the same or another), and the code should output 3. Continue like this as far as you can, but maximum up to 10. Default output formats such as ans = 1 are accepted. You can ignore output to STDERR (or equivalent).

You must reveal the language, byte count of your initial code, the number of integers it works for, as well as an optional number of characters of the initial code. Note: You don't have to reveal any characters, but remember that revealing characters might make it harder for the robbers as they must use the same character in the same position. You can choose which character you use to denote unrevealed characters (for instance underscore), but make sure to specify this.

Cops can provide the uncracked code after one week and call the submission "SAFE". The winning submission will be the shortest uncracked submission that produces the number 10. If no uncracked submissions are able to print 10, the shortest code that produces 9 will win, and so on. Note that the robbers don't have to make the same changes as you do, and they don't have to reproduce the exact code (unless you reveal all characters). They must only reproduce the output.

Submissions posted later than November 24th are welcome but not eligible for the win (because there will likely be fewer robbers around).

Example post:

The following post is a submission in the language MyLang, it is 9 bytes long, and it works for numbers 1 - 8.

MyLang, 9 bytes, 8 numbers

This submission works for 1 - 8. Unrevealed characters are indicated with an underscore: _.

```<code>abc____i
</code>```

Leaderboard

Disclaimer: The leaderboard is not tested and uncracked submissions might not appear in the list.

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/Sites/codegolf/all.css?v=7509797c03ea">

Uncracked submissions

 Language	 Score	 User

Sort by: score creation

Safe submissions

 Language	 Score	 User

```

Body:
JavaScript, 30 bytes, 10 numbers, cracked

alert(Array(_)________.length)

Shouldn't be too hard, but hopefully it's just hard enough to provide a challenge. :) Unrevealed characters are marked with _.


答:
JavaScript, 30 bytes, 10 numbers, by ETHproductions.

Original code:

```<code>1: alert(Array(2).join(3).length)
</code>```

Other numbers

```<code> 2: alert(Array(2).join(31).length)
 3: alert(Array(2).join(314).length)
 4: alert(Array(2).join(3141).length)
 5: alert(Array(2).join(31415).length)
 6: alert(Array(2).join(314159).length)
 7: alert(Array(2).join(3141592).length)
 8: alert(Array(2).join(31415926).length)
 9: alert(Array(2).join(314159265).length)
10: alert(Array(2).join(3141592653).length)
</code>```

Explanation

Array(2) creates an Array with two empty cells. The .join method joins all the elements in an Array using a delimiter, which converts it into a String. In the Original Code, the delimiter was 3. This meant that the two empty cells in the Array are joined together used 3 as their delimiter. This evaluates "3", without anything on either side of the 3 because the Array is empty. And since the length of "3" is 1, this value is outputted to the console.

For the other numbers, I add 1 more digit to the delimiter that is joining the elements of the Array. Hence, this increases its length, thus alerting with increasing values. Note that the numerical value of the delimiter is not important, only its length is.

Snack Snippet!

Note: I used console.log instead of alert in my Snack Snippet for obvious reasons. Also, output from the console is display in the snippet.

console.log(Array(2).join(3).length)
console.log(Array(2).join(31).length)
console.log(Array(2).join(314).length)
console.log(Array(2).join(3141).length)
console.log(Array(2).join(31415).length)
console.log(Array(2).join(314159).length)
console.log(Array(2).join(3141592).length)
console.log(Array(2).join(31415926).length)
console.log(Array(2).join(314159265).length)
console.log(Array(2).join(3141592653).length)```

Title: Code ladder, Robbers

Body:
This is the robbers' thread. The cops' thread goes here.

Write a code that has the same number of bytes as the cop post and where the revealed characters are identical. The code must produce 1 in its initial state, and produce the numbers 2, 3 .. when single alterations are made.

The winner will be the robber that cracked the most posts.

Example post:

MyLang, 9 bytes, 8 numbers (including link to answer), Cop's username.

Original code:

```<code>abc1efghi
</code>```

Code that produces 1 - 8:

```<code>1: abc1efghi
2: abc2efghi
3: abc2efghij
4: kbc2efghij
5: kbc23fghij
6: kbc23fghi
7: kbc63fghi
8: kbc63fhi
</code>```

Explanations are encouraged. The exact format of the robber post is optional.

Body:
JavaScript, 30 bytes, 10 numbers, by ETHproductions.

Original code:

1: alert(Array(2).join(3).length)

Other numbers

 2: alert(Array(2).join(31).length)
 3: alert(Array(2).join(314).length)
 4: alert(Array(2).join(3141).length)
 5: alert(Array(2).join(31415).length)
 6: alert(Array(2).join(314159).length)
 7: alert(Array(2).join(3141592).length)
 8: alert(Array(2).join(31415926).length)
 9: alert(Array(2).join(314159265).length)
10: alert(Array(2).join(3141592653).length)

Explanation

Array(2) creates an Array with two empty cells. The .join method joins all the elements in an Array using a delimiter, which converts it into a String. In the Original Code, the delimiter was 3. This meant that the two empty cells in the Array are joined together used 3 as their delimiter. This evaluates "3", without anything on either side of the 3 because the Array is empty. And since the length of "3" is 1, this value is outputted to the console.

For the other numbers, I add 1 more digit to the delimiter that is joining the elements of the Array. Hence, this increases its length, thus alerting with increasing values. Note that the numerical value of the delimiter is not important, only its length is.

Snack Snippet!

Note: I used console.log instead of alert in my Snack Snippet for obvious reasons. Also, output from the console is display in the snippet.

console.log(Array(2).join(3).length)
console.log(Array(2).join(31).length)
console.log(Array(2).join(314).length)
console.log(Array(2).join(3141).length)
console.log(Array(2).join(31415).length)
console.log(Array(2).join(314159).length)
console.log(Array(2).join(3141592).length)
console.log(Array(2).join(31415926).length)
console.log(Array(2).join(314159265).length)
console.log(Array(2).join(3141592653).length)


答:
Octave, 32 bytes, 10 numbers. Cracked

```<code>_n_(isprime(floor(s____i__ i____
</code>```

_ is a hidden character.

You can try Octave online here.

Original solution:

1: nnz(isprime(floor(sqrt(i):pi')))

2: nnz(isprime(floor('sqrt(i):pi')))

3: nnz(isprime(floor('sqrt(i):pia')))

4: nnz(isprime(floor('sqrt(i):piaa')))

...

Title: Code ladder, Cops

Body:
Octave, 32 bytes, 10 numbers. Cracked

_n_(isprime(floor(s____i__ i____

_ is a hidden character.

You can try Octave online here.

Original solution:

1: nnz(isprime(floor(sqrt(i):pi')))

2: nnz(isprime(floor('sqrt(i):pi')))

3: nnz(isprime(floor('sqrt(i):pia')))

4: nnz(isprime(floor('sqrt(i):piaa')))

...


问:
Find sum of odd numbers
Write a program to find the sum of all odd numbers between a given range [a,b]. Input consists of a single line containing two integers a and b separated by a space. 0 ≤ a,b ≤ 1,000,000,000,000. Your program should not take more than 10 secs.</p>

```<code>Sample Inputs
1 5
4 8
1 8
0 5

Sample Outputs
9
12
16
9
</code>```

答:
Python, 32 bytes

As unnamed lambda function:

lambda a,b:((b+1)/2)**2-(a/2)**2
```

Did some math to get a direct formula. Proof will follow.

Title: Find sum of odd numbers

Body:
Python, 32 bytes

As unnamed lambda function:

lambda a,b:((b+1)/2)**2-(a/2)**2

Did some math to get a direct formula. Proof will follow.


答:
Perl, 14 bytes, 10 numbers, Cracked

```<code>say_!"___"%""_
</code>```

Works for 1 to 10. _ are hidden characters.

I think this shouldn't be too hard to crack. I have an harder one, for 22 bytes, I'll post it if this one is cracked.

Original code :

```<code>say"!"=~y"%""c
</code>```

And replace the "!" by a string of the length of the number you wish to print, for instance !, !!, !!!, etc.

However, ais523 found another way :

```<code>say"!"+1#"%""r
</code>```

Title: Code ladder, Cops

Body:
Perl, 14 bytes, 10 numbers, Cracked

say_!"___"%""_

Works for 1 to 10. _ are hidden characters.

I think this shouldn't be too hard to crack. I have an harder one, for 22 bytes, I'll post it if this one is cracked.

Original code :

say"!"=~y"%""c

And replace the "!" by a string of the length of the number you wish to print, for instance !, !!, !!!, etc.

However, ais523 found another way :

say"!"+1#"%""r


答:
Acc!!, 10 bytes, 9 numbers, cracked

```<code>?????????_
</code>```

Works for 1 to 9. ? is a hidden character.

Title: Code ladder, Cops

Body:
Acc!!, 10 bytes, 9 numbers, cracked

?????????_

Works for 1 to 9. ? is a hidden character.


答:
Perl, 149+2=151 characters

Requires command line options -p0 (this gives me a 2 byte penalty on top of the 149 bytes in the program itself).

```<code>($_,$b,$c,$d)=map length,/(\d+) +(.+)
(-+)
( +)/;$r=$d/($c-$d-1);($x,$y)=$1*$r>$2?($1,$1*$r):($2/$r,$2);$_="$x$,$y",$,.=$"while$c>length;$\="
$3
$4^"
</code>```

Explanation:

The -p0 switch reads the entire input up to the first NUL byte or EOF. This problem doesn't allow NULs, so we'll get the entire input in the variable $_ that's used for regexes, etc., by default.

We start with a regex that parses the input (between the first and second slash). There are several ways we could parse the first weight (e.g. .+?), but I can't get it below 3 characters so I may as well use the obvious \d+. The second number is at the end of the line so it can be parsed as .+ (2 characters). The central line is used to determine how wide the scales are; it's parsed as -+ (many other representations would work). The spaces before the caret on the last line are  +. Once the caret (or indeed any nonspace) appears, we ignore the rest of the input.

Perl automatically captures the four groups of the regex (first weight, second weight, row of hyphens, spaces before the caret) into $1, $2, $3, $4. Giving a regex as an argument to map additionally uses an array of those groups as the array to map over. We therefore take their lengths; this is a convenient way to store the lengths of $3 and $4 without having to write length twice. We also overwrite $_ with the length of $1; we don't really care about the value of this (the number of digit in the left input is kind-of useless), but the fact that it's short ($_'s length is now the number of digits in the number of digits in the first weight, which is necessarily very small compared to the width of the scales).

We measure the ratio $r in which the scales are divided.

$1*$r>$2 checks to see which side is heavier. We store the new weights in $x and $y; these have very simple calculations once the ratio of weights is known.

We concatenate $x, $,, and $y into $_ to produce the top row, then keep adding spaces ($" contains a single space by default, and is shorter than a literal space ' ' would be) onto $, until it's the same length as the middle row (i.e. has length $c). (I chose the variable $, as it's a built-in variable that can safely be changed in this context and starts empty by default.) As length operates on $_ by default, we don't need to give it an argument explicitly. I used a Yoda conditional because it needs considerably less disambiguating syntax to parse correctly.

Finally, I redefine Perl's idea of the output line ending convention ($\) to contain the rest of the set of scales (which is the same as in the input, so I can simply use $3 and $4 directly to produce the bulk of it). Note that this means that there's no trailing whitespace on the third line; adding it would make the program slightly longer and doesn't seem to serve any purpose, so I left it out.

At the end of the program, the -p switch triggers again; this time, it outputs $_ followed by a "newline" ($\). Because I redefined the output newline, these two implicit prints generate the new set of scales between them (although as a side effect, there's no newline on the output).

The -p switch now tries to read input again, but we already slurped the entire file, so it reads EOF and ends the program.

Body:
Perl, 149+2=151 characters

Requires command line options -p0 (this gives me a 2 byte penalty on top of the 149 bytes in the program itself).

($_,$b,$c,$d)=map length,/(\d+) +(.+)
(-+)
( +)/;$r=$d/($c-$d-1);($x,$y)=$1*$r>$2?($1,$1*$r):($2/$r,$2);$_="$x$,$y",$,.=$"while$c>length;$\="
$3
$4^"

Explanation:

The -p0 switch reads the entire input up to the first NUL byte or EOF. This problem doesn't allow NULs, so we'll get the entire input in the variable $_ that's used for regexes, etc., by default.

We start with a regex that parses the input (between the first and second slash). There are several ways we could parse the first weight (e.g. .+?), but I can't get it below 3 characters so I may as well use the obvious \d+. The second number is at the end of the line so it can be parsed as .+ (2 characters). The central line is used to determine how wide the scales are; it's parsed as -+ (many other representations would work). The spaces before the caret on the last line are  +. Once the caret (or indeed any nonspace) appears, we ignore the rest of the input.

Perl automatically captures the four groups of the regex (first weight, second weight, row of hyphens, spaces before the caret) into $1, $2, $3, $4. Giving a regex as an argument to map additionally uses an array of those groups as the array to map over. We therefore take their lengths; this is a convenient way to store the lengths of $3 and $4 without having to write length twice. We also overwrite $_ with the length of $1; we don't really care about the value of this (the number of digit in the left input is kind-of useless), but the fact that it's short ($_'s length is now the number of digits in the number of digits in the first weight, which is necessarily very small compared to the width of the scales).

We measure the ratio $r in which the scales are divided.

$1*$r>$2 checks to see which side is heavier. We store the new weights in $x and $y; these have very simple calculations once the ratio of weights is known.

We concatenate $x, $,, and $y into $_ to produce the top row, then keep adding spaces ($" contains a single space by default, and is shorter than a literal space ' ' would be) onto $, until it's the same length as the middle row (i.e. has length $c). (I chose the variable $, as it's a built-in variable that can safely be changed in this context and starts empty by default.) As length operates on $_ by default, we don't need to give it an argument explicitly. I used a Yoda conditional because it needs considerably less disambiguating syntax to parse correctly.

Finally, I redefine Perl's idea of the output line ending convention ($\) to contain the rest of the set of scales (which is the same as in the input, so I can simply use $3 and $4 directly to produce the bulk of it). Note that this means that there's no trailing whitespace on the third line; adding it would make the program slightly longer and doesn't seem to serve any purpose, so I left it out.

At the end of the program, the -p switch triggers again; this time, it outputs $_ followed by a "newline" ($\). Because I redefined the output newline, these two implicit prints generate the new set of scales between them (although as a side effect, there's no newline on the output).

The -p switch now tries to read input again, but we already slurped the entire file, so it reads EOF and ends the program.


答:
Octave, 32 bytes, 10 numbers, by Luis Mendo

Original code:

```<code>nnz(isprime(floor(s=3):i*-2i))+1
</code>```

Modified codes:

```<code>2:  nnz(isprime(floor(s=3):i*-3i))+1
3:  nnz(isprime(floor(s=3):i*-5i))+1
4:  nnz(isprime(floor(s=3):i*-9i))+1
5:  nnz(isprime(floor(s=3):i*-9i))+2
6:  nnz(isprime(floor(s=3):i*-9i))+3
7:  nnz(isprime(floor(s=3):i*-9i))+4
8:  nnz(isprime(floor(s=3):i*-9i))+5
9:  nnz(isprime(floor(s=3):i*-9i))+6
10: nnz(isprime(floor(s=3):i*-9i))+7
</code>```

There are many ways to make modifications here (for instance s=2 and +0 in the beginning).

Edit: A more probable alternative:

```<code>nnz(isprime(floor(s=2):i*-2i))+0
nnz(isprime(floor(s=2):i*-2i))+1
nnz(isprime(floor(s=2):i*-2i))+2
nnz(isprime(floor(s=2):i*-2i))+3
nnz(isprime(floor(s=2):i*-2i))+4
nnz(isprime(floor(s=2):i*-2i))+5
nnz(isprime(floor(s=2):i*-2i))+6
nnz(isprime(floor(s=2):i*-2i))+7
nnz(isprime(floor(s=2):i*-2i))+8
nnz(isprime(floor(s=2):i*-2i))+9
</code>```

Title: Code ladder, Robbers

Body:
Octave, 32 bytes, 10 numbers, by Luis Mendo

Original code:

nnz(isprime(floor(s=3):i*-2i))+1

Modified codes:

2:  nnz(isprime(floor(s=3):i*-3i))+1
3:  nnz(isprime(floor(s=3):i*-5i))+1
4:  nnz(isprime(floor(s=3):i*-9i))+1
5:  nnz(isprime(floor(s=3):i*-9i))+2
6:  nnz(isprime(floor(s=3):i*-9i))+3
7:  nnz(isprime(floor(s=3):i*-9i))+4
8:  nnz(isprime(floor(s=3):i*-9i))+5
9:  nnz(isprime(floor(s=3):i*-9i))+6
10: nnz(isprime(floor(s=3):i*-9i))+7

There are many ways to make modifications here (for instance s=2 and +0 in the beginning).

Edit: A more probable alternative:

nnz(isprime(floor(s=2):i*-2i))+0
nnz(isprime(floor(s=2):i*-2i))+1
nnz(isprime(floor(s=2):i*-2i))+2
nnz(isprime(floor(s=2):i*-2i))+3
nnz(isprime(floor(s=2):i*-2i))+4
nnz(isprime(floor(s=2):i*-2i))+5
nnz(isprime(floor(s=2):i*-2i))+6
nnz(isprime(floor(s=2):i*-2i))+7
nnz(isprime(floor(s=2):i*-2i))+8
nnz(isprime(floor(s=2):i*-2i))+9


答:
Javascript ES6, 49 bytes (cracked)

```<code>{{$((((((('`fuck rent =+> turn off fin`')))))))}}
</code>```

Is it bad if I focused more on forming coherent words in the scrambled solution?

In any case, this is my first Cops and Robbers challenge.

Update: see comments for cracked code.

Title: Quine Anagrams! (Cops' Thread)

Body:
This is the cops' thread. For the robbers' thread, click here.

Cops' Task

First, write a quine in a language of your choosing.

Next, scramble the quine. Make sure to do this well as the robbers will be trying to unscramble it and find the original source code! Note that the scrambled code does not need to work.

Post an answer on this thread. Include the language, the byte count, and the scrambled code.

Your program may not print to STDERR.

Here is an example of a cop submission:

Python, 29 bytes

```<code>nt _%=_r;_riinp;pr_='t _%%%_'
</code>```

Robbers' Task

For the robbers' thread, click here.

Safe Submissions

If your submission has not yet been cracked after a week of posting, you may add the solution and specify that it is safe. If you do not, your submission may still be cracked.

Scoring

This is code-golf, so the user with the safe submission with the fewest bytes will be the winner of this section.

Leaderboard

Here is a stack snippet to generate a learderboard for this challenge. For it to display properly, please format your submission like this:

```<code># Language Name, N bytes

... other stuff ...
</code>```

If your submission gets cracked, please format like this:

```<code># Language Name, N bytes, [Cracked!](link)

... other stuff ...
</code>```

If your submission is safe, format like this:

```<code># Language Name, N bytes, Safe!

... other stuff ...
</code>```

```

Body:
Javascript ES6, 49 bytes (cracked)

{{$((((((('`fuck rent =+> turn off fin`')))))))}}

Is it bad if I focused more on forming coherent words in the scrambled solution?

In any case, this is my first Cops and Robbers challenge.

Update: see comments for cracked code.


答:
Python 3.5.2, 44 bytes

exec("print('_|__'*18);print('___|'*18);"*5)

This is my first attempted golf, so feel free to leave a suggestion!

Try it here

Title: Build me a brick wall!

Body:
Challenge

I need help building a brick wall! Throw together some code for me
 using no input and produce the following output wall shown below:

```<code>_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
</code>```

Now, this wall is exactly 10 characters high and 70 characters
 wide.

As stated above, no inputs, only code. Least amount of bytes, we have
 to efficiently build this brick wall. Obviously, this program has to
 function to get the wall built..? or it obviously won't build itself!
 Good luck!

Winner

The winner goes to Marinus using the APL language, requiring a whole 12 bytes!
https://codegolf.stackexchange.com/a/99028/61857

Thank you everyone for participating!