text:
All those duplicate questions deserve duplicate code to show them off
All those questions that are duplicates... Ignored and marginalized by society. It is just not... right. We have to do something. There surely must be love for them too.
They feel appreciated if a piece of code outputs a link to a duplicate question. But the duplicate questions are not so easily impressed. They are swept out off their feet only when the code when duplicated outputs a link to another duplicate question. The more the code can be duplicated and still output these links, the more the questions feel more loved.
Your task is to bring love and appreciation to these Stack Exchange pariahs.

Create a piece of code that when duplicated k times outputs a link to a duplicate question. k represents all the numbers in range [1, N].
Edit I made code size matter because I realized you can write a program that can output as many links as you wanted.
Rules:
Language:

any language created prior to the post of this challenge is accepted. You may use a language already used in another answer.
you may not use external resources (a database etc.)
any encoding and any characters are allowed (including white spaces, new lines, non-ASCII). Encoding is UTF-8.
code size does not matter. Size is measured in bytes.
all duplications must be in the same language

Code duplication:

clarification: the code must not duplicate itself. Simply put duplicating here means creating another code by copy-pasting the original one at the end of the last one obtained. Each will result in a new code that is run independently from the others.
all the characters in the original code must be copy-pasted (including trailing new line (if any)). Each time the code pasted must be appended at the end.
the code must create valid output when duplicated 1 (no duplication), 2, 3, 4, 5... N times.
It cannot skip a number (e.g. a code that creates valid output only when duplicated 1, 2, 3, 5, 6 times will be considered only for 1, 2, 3 so N = 3)
each time exactly one link must be output-ed.
example (for what duplication means, not for valid output)

(python3) Original code (k = 1):
try:
  i
except NameError:
  i = 100
else:
  i = 200

if i == 100:
  print("stackoverflow.com/questions/" + str(i),end="")
else:
  print(i)

k = 1 outputs stackoverflow.com/questions/100
k = 2 outputs stackoverflow.com/questions/100200
k = 3 outputs stackoverflow.com/questions/100200200

Duplicate questions links (valid output):

Non-deleted questions from Programming Puzzles & Code Golf and Stack Overflow that were closed as duplicate prior to the time of the posting of this post are considered for this challenge.
Helpful query to search for duplicate questions:

is:question duplicate:yes

duplicates on PPCG and duplicates on SO

Link format. Lets take as an example this post:
https://stackoverflow.com/questions/1066589/iterate-through-a-hashmap

A valid link output for this question is any of these the two base links
stackoverflow.com/questions/1066589
stackoverflow.com/q/1066589
                    ^~~~~~^
                    this is referred as the link number in following paragraphs

to which you may add the prefix(es) www. and/or http://. You may also add a trailing /
Please note that after that you must not add anything (like the question title), even if that link results in a redirect to the question.

You may not use a URL shortner service.
You may not link to an answer or to another part of the page.
The questions don't have to be duplicates of the same original or related in any way (don't have to means they can be if you want).
For each time (for each k) a different question must be linked (two different links to the same question count as the same question)

Multiple Submissions

You may post multiple answers with the same or different languages. Different posts can output the same link.

Scoring

Each link gives 1 point.
Egoistic bonus: +0.5 points for each link to your own question.
Forgive me bonus: +0.5 point for each link to a question you voted to close (for whatever reason).
Judge Jury Executioner bonus: +0.5 point for each link to your own question that you yourself voted to close (for whatever reason).
now what bonus: +0.5 points for each link to a question closed as a duplicate to a question that has no answers.
train of thought bonus: +1 point for each link to a question closed as a duplicate to another duplicate question  (regardless of the length of the train)
dead end bonus: +1 point for each link to a question closed as a duplicate of a question that was closed for a reason other than duplicate. (locked questions that exists because they have historical significance also don't count for this bonus).
George Santayana bonus: +1 point for each link closed as a duplicate of a question by the same user.
You can't live without me bonus: +1.5 points for each link whose number is prime.
Queen of the prom bonus: +2 points for a link to a question of a user with all the questions (on the site of the linked question: PPCG or SO) closed as duplicates (at least 3, including the linked one). This bonus cannot be awarded more than once per user (even if you link to all 3 questions of this user, you are awarded the bonus only once, but you can be awarded this bonus again for a link to a question of another user or the same user but on the other site).
All bonuses are cumulative. (this for instance has the effect that the Judge Jury Executioner bonus will always come with the egoistic and forgive me bonuses).
You don't love me enough penalty:

not_enough_penalty = 0.6 for N = 2 (just 2 links)
not_enough_penalty = 0.8 for N = 3 (just 3 links)
not_enough_penalty = 1 for N >= 4 (4 or more links)

Winning Criteria:

LinkPoints = 1 + bonuses for each link

Points = Sum(LinkPoints) * not_enough_penalty

Votes = number of votes (upvotes - downvotes). Can be negative.

Score = 5 * Points + Votes

Size = number of bytes of original code (k = 1).

Score = (256-Size) / 32 * Points + Votes
Score is rounded to two decimals.

The winner is the answer with the highest score. In the case of a tie the answer with the most votes wins.

The winner will be awarded two weeks from the posting time of this question. If this question has intense activity at that time I will extend this.

Post format

Please specify the language, N - the number of duplication achieved, CodeSize and Points.
Post the original piece of code.
For each k in [1..N] post the link output-ed, the bonuses awarded and LinkPoints.
Please add description where the way the code works is not obvious (for each k if needed) or if the language is not well-known.
Express  the formulas for Points and Score (without Votes, as they will be considered at the end of the challenge).

I made this a code-golf because I realized you could write a program with a switch that could output as many duplicates as you wanted. Since there were no answers I felt I could edit the question.

I've removed the code golf tag, since that is intended for pure code size scoring. code challenge is right for this challenge. Also, why the need to specify encoding as UTF-8? In some cases that seems a bit punishing (in particular APL, which uses it's single-byte code page, but whose characters are well away from the ASCII range because it's older than ASCII).

@MartinBüttner golf tag: ok thanks. UTF-8 I didn't know that. I was trying to take measures against cheating (don't know how you can cheat with the encoding, but you guys are very creative :p). I removed this restriction.

To me, this sounds like users could create duplicate questions, then close them, solely for this challenge.

@mbomb007 Non-deleted questions from Programming Puzzles & Code Golf and Stack Overflow that were closed as duplicate prior to the time of the posting of this post are considered for this challenge. That's why I posted this rule from the beginning.

Ah, I must've missed reading that one.

C++, 212 bytes, 6 links, 10.31 points
#ifndef X
#define Y(N)s##N
#define X(N)Y(N)
#include<cstdio>
int i,j,k[]={2366,117,3818,3450,1047,2933},main;struct S{~S(){j+=k[i++];}};struct G{~G(){printf("stackoverflow.com/q/%d",j);}}g;
#endif
S X(__LINE__);

This code relies on the order of destructor to make it work (which seems to be well defined in this case), mainly because the preprocessor allows us to put a "prologue code" before the duplications, but not "epilogue code" because we don't know where does it end. But destructors run in reverse order, so we could put the final code (the print part) at the start as well.
The k array records the differences of successive link numbers. For now I just take links from the oldest pages. "6 links" seems to give the maximum score.

Resulting links:

https://stackoverflow.com/q/2366
https://stackoverflow.com/q/2483
https://stackoverflow.com/q/6301 (is prime +1.5)
https://stackoverflow.com/q/9751
https://stackoverflow.com/q/10798
https://stackoverflow.com/q/13731

Total score: (256 - 212)/32 × 7.5 = 10.31

Which compiler are you using? I think main runs before the destructors, and it will crash...

@user23013: Works fine on the default clang on Mac OS X.

@bolov: Thanks, amended score.

JavaScript (NodeJS) - 236 characters, including trailing newline
l=root.l||1;f=require('fs');t=(f.readFileSync(__filename)+'').split('\n');d="ge3oe gk05n gj341 gg8ah gfnar ga9i3 g602y g5mwi g2b9i fu75d g4lu0 4v1".split(' ');if(++l==t.length)console.log('https://stackoverflow.com/q/'+parseInt(d[l-2],36))

It uses a hardcoded list of question IDs, encoded in base 36. It reads its own source code, and only prints if it's on the last line of the file.
It results in a total of 12 questions, most closed by me:

https://stackoverflow.com/q/27531806 - 1 + 0.5 (forgive me) + 0.5 (dead end) = 2
https://stackoverflow.com/q/27807179 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27631097 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27603891 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27352731 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27153898 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27136818 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/26981766 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/26603185 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/27088776 - 1 + 0.5 (forgive me) = 1.5
https://stackoverflow.com/q/6301 - 1 + 1.5 (you can't live without me) = 2.5

Link points: 18.
Score: 11.25

Doesn't this output all the links rather than only one?

No; only one at a time. Test it!

I did...and multiple links were printed. Are you claiming that if I paste this 4 times, it will somehow print only one link?

Oh, now i see. Deleting while i fix.

Works now, though it cost me plenty of points, mainly due to an increased filesize.

Tcl, 155 bytes, 15 links, 55.23 points
[proc f args {puts stackoverflow.com/q/[lindex {2366 2483 6301 9751 10798 13731 14599 16064 16233 16550 16704 18584 20146 22708 25376} [llength $args]]}]f

There is a trailing space.
Links:

https://stackoverflow.com/q/2366
https://stackoverflow.com/q/2483
https://stackoverflow.com/q/6301 (prime +1.5)
https://stackoverflow.com/q/9751
https://stackoverflow.com/q/10798
https://stackoverflow.com/q/13731
https://stackoverflow.com/q/14599 (target deleted; I think it should also qualify a bonus...)
https://stackoverflow.com/q/16064 (target not constructive +1)
https://stackoverflow.com/q/16233
https://stackoverflow.com/q/16550
https://stackoverflow.com/q/16704
https://stackoverflow.com/q/18584
https://stackoverflow.com/q/20146
https://stackoverflow.com/q/22708
https://stackoverflow.com/q/25376

Score = (256 - 155) / 32 * 17.5 = 55.23
The score can probably be improved by using another set of questions with more bonuses.

STATA - 252 characters (including trailing newline) N = the number of duplicates on stackoverflow.com
Ignore the trailing space. I didn't know how to adjust this properly. Someone help me format this reasonably.
First this code tries to increment a counter variable. If that fails, it generates a new local variable and sets it equal to 2. Then it decrements it and creates a new variable to keep track of whether or not the page has the phrase " as duplicate by <a" in it. Until a line contains that phrase, the following is run:
Create a local variable to hold the url (using the counter as the question number). Copy the file to the local file a and replace it. Filter a (and move to b the result) by replacing ">" with ">\n" and replace b if necessary. Then read in b, clearing current data (i.e. dropping the d variable) with a string variable representing each line. If the phrase appears in any line, d becomes at least 1, thus ending the loop.
The last line displays the url and continues onto the next line because of the /// comment.
Thus, when k>1, the last line of the first part becomes
cap diu' ///
cap loc \c'++

which is equivalent to:
cap diu' cap loc \c'++

which would throw a syntax error if the capture (cap) command were not used to capture the return code and prevent execution of the line, thus not printing the url unless it is the last of the k copies of the code.
cap loc \`c'++
if _rc>0{
loc c=2
}
loc \`c'--
g d=0
while d<1{
loc u="http://stackoverflow.com/q/\`c'"
copy \`u' "a",replace
filef "a""b",f(>)t(>\n)r
infix str l 1-9999 using "b",clear
egen d=max(strpos(l," as duplicate by `<a"))
loc \`c'++
}
cap di\`u' ///

Possible better approach (explanation coming soon):
cap so d
if _rc>0{
loc c=9761
}
loc f="http://stackoverflow.com/"
loc u="`f'search?page=`c'&tab=newest&q=duplicate%3ayes"
infix str l 1-9999 using `u',clear
g d="`f'q/"+regexs(1) if regexm(l,f="/questions([0-9]+)")
loc `c'--
cap l d in 1

To format code, please indent them by 4 spaces, or click the {} button on the toolbar.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Double Factorial
Challenge
The objective is simple, in the shortest amount of bytes, write a function or program that takes a number and prints its double factorial.
The input must be taken from stdin or a function argument, and it must print the resulting double factorial to stdout.
Inbuilts are disallowed

What makes this significantly different from Find the factorial? Most approaches will be the same IMO.

@Geobits The approach has to be different, due to the additional requirement of only getting the product of the numbers up to n with the same parity.

So... just add if(n%2==k%2) to the loop, right? Or a simple filter in languages with ranges, etc.

@Geobits Essentially. It is similar, but not the same. It requires the use of variables for golfing languages or a bit of stack swapping which Amos up the code size

Maybe at least disallow inbuilts ? :P

Well, since I'm not allowed to post it as an answer any more: Mathematica does have a built-in, so there would have been a 4-byte answer: #!!&

@globby No, I think I blame you for changing the rules to disallow an existing answer... which could have been avoided by posting the challenge in the sandbox first, where someone certainly would have pointed out that loophole.

@MartinBüttner Touché, lesson learned

I waited to VTC as dupe until I saw a few answers, but the current ones only reassure me that most answers here will simply be a couple chars different from the standard factorial.

If the question does not call out that REPL is not accepted, a JS answer without alert or haskell one without print is totally acceptable

...which also seems to be the accepted consensus.

CJam, 13 12 bytes
ri,:)1~%1+:*

Expanded code:
ri            "Read the input as a string and convert it to integer";
  ,           "Create an array of 0 to input integers - 1";
   :)         "Increment each element in the array";
     1~       "Put 1 and do bitwise not to get -2";
       %      "Take every other integer starting from end";
        1+    "Add 1 to the array to account for result of 0 being 1";
          :*  "Reduce product to get double factorial";

At the end of the code, anything on stack is automatically printed to STDOUT in CJam.
Try it online here

Haskell 21
p n=product[n,n-2..1]

@MartinBüttner: It does. At least within ghci.

I can argue that my function without the alert prints to console when run from console.

@Optimizer: Sure. Why not? Some languages provide or run in interactive environments (aka repl). Use it!

Actually, looks like we have a consensus for this on meta.

Matlab 16
@(n)prod(n:-2:1)

It is pretty sraight forward.

JavaScript, ES6, 38 36 bytes
Wow this is huge!

f=a=>alert((g=n=>n>1?n*g(n-2):1)(a))
<input id=D /><button onclick="f(+D.value)">Run</button>

Of course I am just counting JS code. HTML is just for stack snippet demo.
Run it in latest Firefox browser.

I know this is old and a closed challenge but you can do it in 34: f=(n,o=1)=>n>1?f(n-2,n*o):alert(o)

Pyth: 11 character
u*GhH%2_UQ1

Q is the input value. UQ creates the list [0, 1, 2, ..., Q-1], _ inverts it, and %2 removes every other element [Q-1, Q-3, Q-5, ..., (1 or 0)]. u*GhH...1 reduces the list by multiplying the list elements (increased by 1) to 1.
Try it here: Pyth Compiler/Executor

r, 30
f=function(n)prod(seq(n,1,-2))

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Put the line in the code you nut and shake it all up
Using one programming language write 5 single-line programs, each of which outputs a different line of the first verse to Harry Nilsson's 1972 song "Coconut" when run individually:

Brother bought a coconut, he bought it for a dime
His sister had another one, she paid it for a lime
She put the lime in the coconut, she drank them both up
She put the lime in the coconut, she drank them both up
She put the lime in the coconut, she drank them both up

(full lyrics)
The last 3 lines have the same lyrics, so your last 3 programs might be as well.
There are 5 factorial or 120 ways these 5 single-line programs can be arranged one per line in a single 5-line program. You must optimize your single-line programs such that for as many of these 120 combinations as possible the 5-line program outputs the entire verse in its proper order, exactly as it appears above.
Example
The simplest answer would have 5 single line print statements, the last 3 identical:
print('Brother bought a coconut, he bought it for a dime')
print('His sister had another one, she paid it for a lime')
print('She put the lime in the coconut, she drank them both up')
print('She put the lime in the coconut, she drank them both up')
print('She put the lime in the coconut, she drank them both up')
The output to the 5-line programs will be the verse in its proper order as long as the first two single-liners are in their correct places. Only 6 of the 120 possible arrangements accomplish this.
Scoring
The submission with the most working cases out of all 120 wins. Tie breaker goes to the set of programs with the lowest cumulative byte count (newlines not counted). The example has 309 bytes.
Details

Your programs may not read their own source code. Nor should they read other external files or require a network connection.

Output to stdout or closest alternative. You may also output to a file with the name of your choice.

"Single-line programs" are strings that contain any characters except line terminators (you'll probably just need to worry about newlines)
.

When composing the single-liners into the 5-liners you should add exactly 4 newlines, one between each adjacent pair of single-liners. You may optionally add a trailing newline.

"Write 5 programs which each output a different line..." isn't that impossible?

@feersum The lines are different. Three of them just happen to have the same text.

What if I have a Java file containing 5 classes, each with a main method? Then which should be run, when running the program?

@feersum Well what does your compiler do? I'm not sure what Java does when multiple classes in the same file both have main.

When running a Java program, one must specify the main class.

@feersum How about assume the first instance of main will be called.

@Calvin'sHobbies what do you mean with read its own sourcecode?

The way I remember this one is that one Coca-Cola ad where they "put the lime in the Coke"...

CJam, 120 valid permutations, 334 299 290 bytes
"She put the lime in the coconut, she drank them both up"N+
"Brother bought a coconut, he bought it for a dime"N+]$~
"She put the lime in the coconut, she drank them both up"N+
"His sister had another one, she paid it for a lime"N+]$~
"She put the lime in the coconut, she drank them both up"N+

Pretty simple logic:

Put each line of the song in each of the 5 programs
Wrap everything on stack in an array
Sort the array
Unwrap the array so that the next program can use the same logic
In each step, we have the partial lyrics in an array. Luckily, sorting the array gives the correct order of the lyrics.

UPDATE: Turns out that you don't need the wrap-sort-unwrap cycle after the 3 similar and appearing at the end lines of the song. I can explain why if its not that apparent :)

Prelude, 120 permutations, 2045 2035 bytes
9-9-9-9-9-9-9-9-9-5-97+993++09-9-9-9-9-9-9-1-8992++96+209-9-9-9-9-9-9-1-94+58992++09-9-9-9-9-9-9-1-92+95+199+409-9-9-9-9-9-9-1-58991++09-9-9-9-9-9-9-1-09-9-9-9-9-7-992++993++95+96+396+309-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-95+909-9-9-9-9-9-9-1-594+993+09-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-992++993++97+09-9-9-9-9-9-9-1-5809-4-                                                                          (9+9+9+9+9+9+9+9+9+9+6+!)
9-9-9-9-9-9-9-9-9-5-594+9409-9-9-9-9-9-9-1-109-9-9-9-9-9-9-1-99+96+609-9-9-9-9-9-9-1-992++909-9-9-9-9-9-9-1-992++87993++96+209-9-9-9-9-9-9-1-5809-9-9-9-9-9-9-1-09-9-9-9-9-7-992++993++95+96+396+309-9-9-9-9-9-9-1-109-9-9-9-9-9-9-1-992++87993++96+209-9-9-9-9-9-9-1-99+58992++96+99+09-9-9-3-                                             (9+9+9+9+9+9+9+9+9+9+6+!)
9-9-9-9-9-9-9-9-9-5-97+993++09-9-9-9-9-9-9-1-8992++96+209-9-9-9-9-9-9-1-94+58992++09-9-9-9-9-9-9-1-92+95+199+409-9-9-9-9-9-9-1-58991++09-9-9-9-9-9-9-1-09-9-9-9-9-7-992++993++95+96+396+309-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-95+909-9-9-9-9-9-9-1-594+993+09-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-992++993++97+09-9-9-9-9-9-9-1-5809-4-                                                 (9+9+9+9+9+9+9+9+9+9+6+!)
9-9-9-9-9-9-9-9-9-5-594+993+09-9-9-9-9-9-9-1-109-9-9-9-9-9-9-1-99+96+609-9-9-9-9-9-9-1-992++909-9-9-9-9-9-9-1-49197+09-9-9-9-9-9-9-1-58991++09-9-9-9-9-9-9-1-09-9-9-9-9-7-595+96+09-9-9-9-9-9-9-1-99+58992++96+95+109-9-9-9-9-9-9-1-41809-9-9-9-9-9-9-1-99+5992++991++9991++09-9-9-9-9-9-9-1-991++909-9-6-                                                           (9+9+9+9+9+9+9+9+9+9+6+!)
9-9-9-9-9-9-9-9-9-5-97+993++09-9-9-9-9-9-9-1-8992++96+209-9-9-9-9-9-9-1-94+58992++09-9-9-9-9-9-9-1-92+95+199+409-9-9-9-9-9-9-1-58991++09-9-9-9-9-9-9-1-09-9-9-9-9-7-992++993++95+96+396+309-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-95+909-9-9-9-9-9-9-1-594+993+09-9-9-9-9-9-9-1-58992++09-9-9-9-9-9-9-1-992++993++97+09-9-9-9-9-9-9-1-5809-4-                                                                                (9+9+9+9+9+9+9+9+9+9+6+!)

This has ultimately convinced me that Prelude and CJam need a child. If it wasn't for Prelude's very limited instruction set, this submission would actually be very competitive, if it wouldn't even beat CJam.
The basic idea is the following
"push line 4"               print
"push line 1"print
"push line 3"          print
"push line 2"     print
"push line 5"                    print

In Prelude, each line is its own "voice" with its own stack, and these voices are executed in parallel. That is, in the full program, each line will just individually construct the string and at print it at the end. But due to the offsets of the print statements, the order of the lines doesn't matter at all for the order of the output, since execution is left-to-right, not top-to-bottom.
Now, why are the lines so long? Prelude only stores numbers on its stack. Furthermore, it can only push a single-digit number at a time, so larger numbers have to be constructed from addition and subtraction (there is no multiplication either or other arithmetic either). So the largest part of code is simply calculating and pushing the right character codes. To shorten this a bit, I offset them by 96. At the end, to print, I loop until the stack is empty (i.e. a 0 is encountered), add 96 to each number, and print it.
Note that the strings are pushed in reverse, since they're printed from last to first character.
This assumes the Python interpreter with NUMERIC_OUTPUT = False (which is how the spec defines I/O).
I used the following CJam code to generate the string construction:
"Brother bought a coconut, he bought it for a dime
"W%{i96-_0<{zLa*9/:,'-*'-+0\+}{La*9/:,_,'+*W<}?}%

Lastly, just for fun, why I think this would be really short if Prelude had a concept of strings:
"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"N+!
"emid a rof ti thguob eh ,tunococ a thguob rehtorB"N+!
"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"N+!
"emil a rof ti diap ehs ,eno rehtona dah retsis siH"N+!
"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"N+!

Now the print statements ! are already in the right order, so I wouldn't even need to offset them. I think I'll get down to implementing this some time.

Ruby, 120 valid permutations, 430 bytes
$*[1]='His sister had another one, she paid it for a lime';a||=at_exit{puts($*-[p])}
$*[0]='Brother bought a coconut, he bought it for a dime';a||=at_exit{puts($*)}
$*[2]='She put the lime in the coconut, she drank them both up';a||=at_exit{puts($*-[p])}
$*[3]='She put the lime in the coconut, she drank them both up';a||=at_exit{puts($*-[p])}
$*[4]='She put the lime in the coconut, she drank them both up';a||=at_exit{puts($*-[p])}

Works in any order, or individually. Each line modifies global state, then sets a hook to be executed at the end of the program unless the hook has already been set.

The question says " 5 single-line programs". Does not this mean each line should be in a separate program? Not all in one?

Just a question of formatting. Each line works as its own program.

><>, 120 permutations, 703 bytes
<    /a"emid a rof ti thguob eh ,tunococ a thguob rehtorB"0a.#.!50padpacpabpaapa9pa8pa7p97p87p77p67p57p95p84p73p62p51"/////\\\\\>l0=?;o"
<   / a"emil a rof ti diap ehs ,eno rehtona dah retsis siH"09.#.!50padpacpabpaapa9pa8pa7p97p87p77p67p57p95p84p73p62p51"/////\\\\\>l0=?;o"
<  /  a"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"08.#.!50padpacpabpaapa9pa8pa7p97p87p77p67p57p95p84p73p62p51"/////\\\\\>l0=?;o"
< /   a"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"07.#.!50padpacpabpaapa9pa8pa7p97p87p77p67p57p95p84p73p62p51"/////\\\\\>l0=?;o"
</    a"pu htob meht knard ehs ,tunococ eht ni emil eht tup ehS"06.#.!50padpacpabpaapa9pa8pa7p97p87p77p67p57p95p84p73p62p51"/////\\\\\>l0=?;o"

The one-liner restriction was pretty tough for a 2D language, so I had to find a way to make the most of the . teleport instruction.
The initial < makes program flow leftward, wrapping around and executing
"o;?=0l>\\\\\\/////"15p26p37p48p59p75p76p77p78p79p7ap8ap9apaapbapcapdap

This is a series of p (put) instructions which places chars until the board looks like this:
<    /<lyrics1>0a.#.!50<blah>
<   / <lyrics2>09.#.!50<blah>
<  /  <lyrics3>08.#.!50<blah>
< /   <lyrics4>07.#.!50<blah>
</    <lyrics5>06.#.!50<blah>
 /     \
  /    \
   /   \
    /  \
     / \
       >l0=?;o

The #.!50 then flips program flow back to rightward again, before jumping to line 5. What follows is this:

Following the / mirror on line 5 finds lyrics 5, which is pushed onto the stack. We then teleport to line 6.
Following the / mirror on line 6 finds lyrics 4, which is pushed onto the stack. We then teleport to line 7.
Following the / mirror on line 7 finds lyrics 3...

This happens until we push lyrics 1, at which point we teleport to line 10. This is a loop to print the whole stack until it is empty.
If only one line of the program is present, then the \ mirrors do the same job as the teleports on each lyric line.
If the program is scrambled, then the explanation above still applies, so the program works for all permutations!

JavaScript (V8), 389 bytes
a=setTimeout;a(_=>a(_=>print`She put the lime in the coconut, she drank them both up`))
a=setTimeout;a(_=>a(_=>print`She put the lime in the coconut, she drank them both up`))
a=setTimeout;a(_=>a(_=>print`She put the lime in the coconut, she drank them both up`))
setTimeout(_=>print`His sister had another one, she paid it for a lime`)
print`Brother bought a coconut, he bought it for a dime`

Try it online!
Silly

Deadfish~, 6 (it's probably not possible to do more)
{iiiiii}iiiiiic{iiiii}ddcdddciiiiic{d}ddcdddc{i}iiic{{d}ii}ddc{iiiiii}iiiiiic{i}iiiciiiiiic{d}ddddcic{i}iic{{d}ii}ddddc{iiiiii}iiiiic{dddddd}dddddc{{i}ddd}dddc{i}iic{d}ddc{i}iicdc{i}dddcdc{{d}iii}ddc{d}ddc{{i}ddd}iicdddc{{d}iii}ic{iiiiii}iiiiiic{i}iiiciiiiiic{d}ddddcic{i}iic{{d}ii}ddddc{{i}ddd}iiic{i}ic{{d}ii}ddddc{{i}ddd}c{i}dciiic{{d}ii}ddc{iiiiii}iiiiic{dddddd}dddddc{{i}ddd}ddciiiiiciiiic{d}iic

{iii}iic{iiii}c{iii}iiic{i}c{{d}ii}dddc{{i}dd}iiic{d}c{i}cic{d}dddddc{i}iiic{{d}ii}ddc{{i}ddd}iic{d}iiiciiic{{d}iii}iic{iiiiii}iiiiic{i}iiiciciiiiic{d}ddcdddc{i}iiic{{d}ii}ddc{{i}dd}dcdc{d}ic{dddddd}iiic{d}ddc{{i}dd}iiic{d}dcdddc{{d}iii}ic{{i}dd}c{d}dddddc{i}ddcdddddc{{d}iii}iic{{i}ddd}iiic{i}ic{{d}ii}ddddc{{i}ddd}c{i}dciiic{{d}ii}ddc{iiiiii}iiiiic{dddddd}dddddc{{i}ddd}iiiiiicdddciiiic{d}iic

{iii}iic{iiiii}ic{ii}icdddc{{d}iii}ic{{i}dd}ciiiiicdc{{d}ii}ddddc{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}iiiiiicdddciiiic{d}iic{{d}iii}ic{{i}ddd}iiiciiiiic{{d}ii}iic{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}dddc{i}iic{d}ddc{i}iicdc{i}dddcdc{{d}iii}ddc{d}ddc{{i}dd}iiic{d}dcdddc{{d}iii}ic{{i}ddd}ddc{i}iiiic{dd}iiic{i}iiicdddc{{d}iii}dddddc{{i}dd}iiiic{d}ddcdddc{i}ddc{{d}ii}iiic{iiiiii}iiiiiic{i}iiiciiiiic{d}ddc{{d}iii}ddc{{i}dd}iiiiicdddddc

{iii}iic{iiiii}ic{ii}icdddc{{d}iii}ic{{i}dd}ciiiiicdc{{d}ii}ddddc{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}iiiiiicdddciiiic{d}iic{{d}iii}ic{{i}ddd}iiiciiiiic{{d}ii}iic{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}dddc{i}iic{d}ddc{i}iicdc{i}dddcdc{{d}iii}ddc{d}ddc{{i}dd}iiic{d}dcdddc{{d}iii}ic{{i}ddd}ddc{i}iiiic{dd}iiic{i}iiicdddc{{d}iii}dddddc{{i}dd}iiiic{d}ddcdddc{i}ddc{{d}ii}iiic{iiiiii}iiiiiic{i}iiiciiiiic{d}ddc{{d}iii}ddc{{i}dd}iiiiicdddddc

{iii}iic{iiiii}ic{ii}icdddc{{d}iii}ic{{i}dd}ciiiiicdc{{d}ii}ddddc{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}iiiiiicdddciiiic{d}iic{{d}iii}ic{{i}ddd}iiiciiiiic{{d}ii}iic{{i}dd}iiiic{d}ddcdddc{{d}iii}ic{{i}ddd}dddc{i}iic{d}ddc{i}iicdc{i}dddcdc{{d}iii}ddc{d}ddc{{i}dd}iiic{d}dcdddc{{d}iii}ic{{i}ddd}ddc{i}iiiic{dd}iiic{i}iiicdddc{{d}iii}dddddc{{i}dd}iiiic{d}ddcdddc{i}ddc{{d}ii}iiic{iiiiii}iiiiiic{i}iiiciiiiic{d}ddc{{d}iii}ddc{{i}dd}iiiiicdddddc

This is so long.....

Please read the challenge again, this is not a plain kolmogorov-complexity task

@Leo It's hard to tell whether it's actually pure kolmogorov-complexity. In this case I can fix the answer. With the other one, I got mixed up.

Are you using any kind of generator?

Do you think I write these by hand? I did write the generator though...

Crazy, generated programs are too long, I am planning to write an optimal generator. You don't know that s can push the accumulator squared, so you can save a lot of bytes.....

Well, the first line of the challenge is 'Using one programming language write 5 single-line programs, each of which outputs a different line of the first verse to Harry Nilsson's 1972 song "Coconut" when run individually', just from that it should be clear that 5 separate programs are needed. If you keep reading you will also find out that this question uses a special scoring method, I believe the score of your submission would be 6

Such as first two characters can be golfed into {i}ddsiic{iiiii}ddc instead of {iiiiii}iiiiiic{iiiii}ddc, you can cut down a lot of bytes like this

@Wasif You can play with my generator here. I didn't implement s because it's really only useful for the first bit - Character codes are 32-126, so there's no point. Also doesn't use o.

You can upload it on github, And can I fork it in Python and try to make it more efficient?

@Wasif Just look at the source code by inspecting - It basically finds the differences between the character codes, turns into one string of is and ds joined by cs, then uses regexp to replace everything with shorter versions.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Find Anagrams in the Dictionary
This a code challenge. The winner will be the person to provide the most efficient implementation of the solution in terms of algorithmic complexity.
Using the dictionary found in '/usr/share/dict' (on OS X and Linux), your task is to find the word with the most anagrams of itself in the dictionary, and print all of the words that are the anagrams.

Unless you're certain that the problem is sufficiently difficult, "first person to solve the question" is usually a bad winning criteria because it would disadvantage anyone who's asleep right now.

Also, what happens if the efficiency is in terms of the length of the words? Because surely you need to traverse the words themselves in order to decide if any two are anagrams of each other...

You are both right, I will rephrase the question to make it more generic. Thank you for your input.

I think "most efficient" is underspecified. Can one preprocess the dictionary? Does one find anagrams of a single word or a list of words? Is this about actual performance on real dictionaries, or worst-case theoretical behavior?

Ok. Should I change it to most creative?

You need to add an objective measure for answers. I suggest algorithmic complexity (O(logn) > O(n) > O(nlogn) > O(n^2) etc). In the event of a tie, you should pick another measure (eg: fastest single threaded execution, least run-time space, most votes, oldest answer ;-).

Also, if you mean to assess answers on performance of the /usr/share/dict file, say so. Not 'Assume you have' but 'You will use'.

You added the [fastest-code] tag (which is for fastest runtime speed), but you mention algorithmic complexity in your challenge. Which one is the actual criterion? (in case of algorithmic complexity, use the [fastest-algorithm] tag)

Python 2
Efficient to write, and reasonably efficient to run.
groups = {}
for word in open('/usr/share/dict/words'):
    word = word.strip()
    signature = ''.join(sorted(list(word)))
    if signature not in groups:
        groups[signature]=[]
    groups[signature].append(word)
anagrams = groups.values()
maxlen = max(len(x) for x in anagrams)
for group in (x for x in anagrams if len(x) == maxlen):
    print ' '.join(sorted(group))

produces:
carets caster caters crates reacts recast traces
pares parse pears rapes reaps spare spear

in about 0.4 seconds.
The algorithm has O(n) complexity. The full word list is processed in 0.42 seconds. A half-size word list is processed in the expected 0.21 seconds.

Sorting each word alphabetically is considered the "correct" solution. +1.

Edited to add sort on output.

C++ 14 - 0.077 seconds for 52875 words

Code:
#include <thread>
#include <mutex>
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>

using namespace std;

void thread_func(mutex& file_lock, mutex& map_lock, map<string, vector<string>>& anagrams, ifstream& file) {
    string word;
    string sorted_word;
    while (true) {
        {
            lock_guard<mutex> locker(file_lock);
            if (file.eof()) {
                return;
            }
            file >> word;
        }
        sorted_word = word;
        sort(sorted_word.begin(), sorted_word.end());
        {
            lock_guard<mutex> locker(map_lock);
            anagrams[sorted_word].push_back(word);
        }
    }
}

void nothread_func(map<string, vector<string>>& anagrams, ifstream& file) {
    string word;
    string sorted_word;
    while (true) {
        if (file.eof()) {
            return;
        }
        file >> word;
        sorted_word = word;
        sort(sorted_word.begin(), sorted_word.end());
        anagrams[sorted_word].push_back(word);
    }
}

int main(int argc, char *argv[]) {
    string fname = "/usr/share/dict/words";
    int number_of_threads = 1;

    if (argc > 1) {
        fname = argv[1];
    }
    if (argc > 2) {
        number_of_threads = atoi(argv[2]);
    }

    mutex file_lock;
    mutex map_lock;
    map<string, vector<string>> anagrams;
    cout << "Opening file '" << fname << "'" << endl;
    ifstream file(fname);
    if (!file) {
        cerr << "Could not open file" << endl;
        return 1;
    }
    if (number_of_threads == 1) {
        nothread_func(anagrams, file);
    }
    else {
        cout << "Starting " << number_of_threads << " threads" << endl;

        vector<thread> threads;
        for (int i = 0; i < number_of_threads; ++i) {
            thread th(thread_func, ref(file_lock), ref(map_lock), ref(anagrams), ref(file));
            threads.push_back(move(th));
        }
        for (auto& thread : threads) {
            thread.join();
        }
        cout << "Threads done" << endl;
    }
    int largest_size = max_element(anagrams.begin(), anagrams.end(), [](const auto& a, const auto& b){return a.second.size() < b.second.size();})->second.size();
    for (auto p : anagrams) {
        if (p.second.size() == largest_size) {
            for (auto word : p.second) {
                cout << word << " ";
            }
            cout << endl;
        }
    }
}

Compile: g++ anagrams.cpp -o anagrams --std=c++14 -pthread -ggdb -O3
CLI: ./anagrams <wordfile, defaults to /usr/share/dict/words> <number of threads, defaults to 1>
Example:
$ wc -l /usr/share/dict/cracklib-small
52875 /usr/share/dict/cracklib-small
$ time ./anagrams /usr/share/dict/cracklib-small
Opening file '/usr/share/dict/cracklib-small'
caret carte cater crate react recta trace
pares parse pears rapes reaps spare spear

real    0m0.077s
user    0m0.073s
sys     0m0.000s

The code does have multithreaded built in, but it slows things down on my system. Might be useful on slower systems / bigger files. If the number of threads is 1, it disables threads and does everything normally. Algorithm is essentially the same as CarpetPython's, but my code is slightly longer (well, 81 lines).


text:
Create a universal two-dimensional cellular automaton cell using two-way universal logic processors
In Conway's Game of Life, a cell is in a state of either on or off, depending on the on-and-off state of the eight cells surrounding it.
We can simulate this using a logic gate network with some sort of clock signal that updates every cell all at once. Your task in this problem is to build the logic gate network for a single cell that will update the new state of the cell given the state of its neighbours.
This cell is a logic gate network that takes eight neighbour-cell inputs N1, N2, ..., N8, the current on/off state of its own cell L, and 18 "rule" inputs B0, B1, B2, ..., B8 and S0, S1, S2, ..., S8, and evaluates a new L value (to an output L') as follows:

if L is currently 0 and Bn is on where n is the number of N1, N2, ..., N8 that are currently set at 1, then L' is set to 1. Otherwise, it stays 0.
if L is currently 1 and Sn is off where n is the number of N1, N2, ..., N8 that are currently set at 1, then L' is set to 0. Otherwise, it stays 1.

In the example of Conway's Game of Life, B3, S3, and S2 are on, while the rest of them are all off.
Unlike my previous logic gate tasks, for this task you may use any two-input logic gates you want, not just NAND gates. This includes exotic gates such as if A then B, A or not B, or simply A, a gate that takes two inputs and always returns the first one (although I'm not sure why you'd want to use that one, you are allowed to). You are allowed unlimited constants, splits, and ground wires.
The network to use the fewest logic gates to achieve this wins.

Can we use gates that take more than 2 inputs?

Can we  use  a "highest    bit in a  4-bit   adder"   8-input  gate   as      one  of our atomic gates?

@Volatility If a gate took more than 2 inputs, it wouldn't be a 2ULP (It would be a 3ULP/etc.). So no.

@JanDvorak same as Volatility, you'll have to construct it out of smaller gates.

OK,  we're  limited  to  two inputs, but   what   what   about gates  that  have more than one output? Say, a half-adder?

Nope, a 2ULP always has two inputs and one output.

In effect the question is asking you to make a 2D Game of Life cell using any two-input-one-output logic gates you want.

89 gates using sorting network
I think the basic structure pretty much has to be a sum unit and a demultiplexer which uses the output of the sum unit and L to select the appropriate B_i or S_i. So there's one decision which is definitely interesting, and one dependent decision which may be interesting.
The definitely interesting decision is the output format of the sum. The dependent decision is whether to structure the 18-value demux as two 9-value demuxes (switched by the sum) feeding into a 2-value demux (switched by  L) or as 9 2-value demuxes feeding into a 9-value demux.
I'm choosing to have the sum output in unary, so the 9-value demux is just 8 2-input demuxes in a chain, and the dependent decision is uninteresting.
Counting in unary via sorting network
AND and OR gates can be considered instead to be MIN and MAX gates, giving a two-gate way of sorting two bits:

These pairwise sorting operators can be combined to sort any number of bits (and, if generalised to MIN and MAX operations over any total order, to sort any number of elements of that order) in a sorting network. The standard notation shows just which lines are sorted at each step, and drawing the gates would be quite messy. The best possible sorting network for 8 inputs requires 19 pairwise sorters, which can be arranged as so:

So for a total of 38 gates, the inputs N1 to N8 are transformed into 8 intermediate values T1 = MAX(N1, ..., N8) to T8 = MIN(N1, ..., N8). Effectively Ti is true iff at least i of the inputs are true.
Demultiplexing
A 2-value demultiplexer can be done with 3 gates in many many ways. E.g.

An n-value demux taking unary input S_i and selecting between values V_i can be built up recursively from n-1 2-value demuxes as follows:
d_0 = V_0
d_{i+1} = S_{i+1} ? V_{i+1} : d_i

So two 9-value demuxes and a 2-value demux takes 17 demuxes; so does 9 2-value demuxes and a single 9-value demux.
So the grand total gate count is 38 for the sorting network + 17*3 for the demuxes, giving 89.

114 107 gates
A diagram of the setup, with example inputs (link to full-sized image):

Created in Logisim
This uses a simple approach; first it counts the number of live neighbouring cells, and then checks if that number fulfills a birth/survival condition.


text:
Remove a weight so the rest can't be balanced
This code-golf challenge is based on the following puzzle:

You have an odd number of tokens whose weights are known whole numbers, and they don't all have the same weight. Show that there's a token you can remove so that the remaining tokens can't be split into two equal-size sets that have the same total weight.

Here's the canonical solution to the puzzle, which also suggests an algorithm to do it (spoilers if you want to solve the puzzle yourself):

 If all the weights are even or all odd, the problem is unchanged if we truncate the least significant bit from each one (i.e. floor-divide by 2). Keep doing that until there's at least one even weight and one odd weight -- this must happen eventually because the total weight decreases at each step. Then, remove a weight whose parity is opposite the parity of the sum, leaving an odd total weight, which clearly prevents an even split.

Your goal is to figure out such a weight to remove. Shortest code wins.
Input:
An odd-size list of positive whole numbers, not all the same. Any list-like structure is fine, though it has to work with the numbers in any order.
Output:
One of those numbers, such that the remaining numbers can't be partitioned into two sets with equal size and equal sum. You must output the number, not its index.
If there's multiple choices, any one of them is fine. It doesn't have to be the number chosen by the solution above.
Your code should be able to handle test cases like below within one second.
Test cases:
[1, 2, 3]
1

[3, 3, 3, 3, 3, 3, 5]
3

[1, 2, 3, 4, 5, 6, 7, 8, 9]
2

[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
1

[128, 256, 256]
256

[18770, 10578, 7506, 5458, 4434, 6482, 5458, 4434, 2386, 11602, 1362, 16722, 11602, 23890, 12626, 47442, 57682, 35154, 57682, 81234, 44370, 12626, 12626, 46418, 68946, 91474, 2386, 43346, 46418, 35154, 32082]
7506

If you want to see all possible outputs (this is just to show, your code must output exactly one):
[1, 2, 3]
{1, 2, 3}

[3, 3, 3, 3, 3, 3, 5]
{3}

[1, 2, 3, 4, 5, 6, 7, 8, 9]
{2, 4, 6, 8}

[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
{1}

[128, 256, 256]
{256}

[18770, 10578, 7506, 5458, 4434, 6482, 5458, 4434, 2386, 11602, 1362, 16722, 11602, 23890, 12626, 47442, 57682, 35154, 57682, 81234, 44370, 12626, 12626, 46418, 68946, 91474, 2386, 43346, 46418, 35154, 32082]
{68946, 5458, 44370, 46418, 11602, 23890, 7506, 91474, 32082, 1362, 81234}

Its my personal opinion that with the time limitation here (and here) answers are mostly forced to use the same algorithm. So its just the matter of language .

"[Truncating] the least significant bit" is the same as floor division by 2, right?

@KSFT Yes, it's the same as floor-dividing by 2.

CJam, 19 17
q~:T{T:^^2bW%}$W=

Input format:
[1 2 3 4 5 6 7 8 9]

2 bytes thanks to Optimizer.

q~:Q{Q:^^2bW%}$W= 17

Python 2, 99
This came out pretty badly.
s=input()
b=1
while{x&b for x in s}<{0,b}:b+=b
print[x for x in s if(reduce(int.__xor__,s)^x)&b][0]

Numbers may be input comma-delimited.

I think it's shorter as a lambda f=lambda L,d=1:{0}<{x&d for x in L}and[x for x in L if(x^reduce(int.__xor__,L))&d][0]or f(L,2*d)


text:
Cell-phone golf
Older cellphones have 3 or 4 characters mapped to each number from 2-9 and that number must be pressed a certain number of times to get the required character. Let's assume our cellphone has this map:
1:1
2:abcABC2
3:defDEF3
4:ghiGHI4
5:jklJKL5
6:mnoMNO6
7:pqrsPQRS7
8:tuvTUV8
9:wxyzWXYZ9
0:<space><newline>0

If you want to type b, it will take 2 presses of the 2 key since b is mapped to the second position on the 2 key.
To type exaMPle TExt 01 , you would press 33 99 2 6666 77777 555 33 0 8888 33333 99 8 0 <a 1-sec pause here in real life but we'll ignore it>000 1
Additionally, the * key brings up the following page of special characters:
.,'?!
"-()@
/:_;+
&%*=<
>£€$¥
¤[]{}
\~^¡¿
§#|`

The first character . is highlighted. You can navigate to each character in four directions. It takes one additional key press to insert. So to insert $, you would press *↓↓↓↓→→→<select> i.e. a total of 9 key-presses.

Your program must take input (STDIN or prompt) of contact names followed by a newline followed by whatever numbers a person types on that phone's keyboard.
Eg.
JOHN DOE
JANE DOE
BOBBY TABLES

36

Your program must output the list of contacts which match any of the characters mapped to the keys the user presses.
In this example, since the user pressed 36, the output list must consist of all contacts that match (completely or partially) the regex \b[d-fD-F3][m-oM-O6] since:
   3       6
   |       |
   v       v
[d-fD-F3][m-oM-O6]

In this case, the output would be:
JOHN DOE
JANE DOE

All contacts should be considered case insensitive. So 36 should match jOhN Doe, JAne doE , etc...
If no contacts match, you should output a blank line.
Details:

Input "contacts" will be ^[a-zA-Z0-9 ]+$. Numbers are allowed.
Input numbers will be [0-9]+ (obviously)
Your source code may contain any characters from [0-9a-zA-Z \n] UNION <chars from special chars table>

Scoring
Your score will be the number of key-presses that it takes to type out your program on this particular phone. Lowest score wins.
You can use programs in this question for scoring.

Here's the original sandbox question - http://meta.codegolf.stackexchange.com/a/1790/8766

Very similar to http://codegolf.stackexchange.com/q/42220/31414

Do we have to parse the Unicode characters like →?

@KSFT NO, the arrows are only placeholders to indicate keypresses. You need to parse only the characters in the keymaps.

@user80551 I'm confused. Are we supposed to parse characters or keypresses?

@KSFT You are supposed to parse words followed by characters within [0-9]. Your program will be scored based on number of "keypresses" required to type its source.

Ah...So, the names will never contain characters other than letters and spaces?

@KSFT And numbers. JOHN DOE 2 is valid input.

Shouldn't the example regex be /[d-fD-F3][m-oM-O6]/, then?

@KSFT You're right; detailed it in the question

I know the "boby tables" reference. ;-)

@proudhaskeller almost all people here do


text:
Confused badminton players
Introduction
Jim and Bob are playing badminton doubles against two other players, but mid-game they face a dilemma:
After a fast-paced rally they have no idea who has to serve next and where they have to stand for the next serve.
Bad enough they only know the scores in order.
Rules:
To help them out, you have to know the rules:

If the serving team has an even score, serving is done by the player on the right side (relatively facing towards the net)
If the serving team has an odd score, serving is done by the left player.
If the serving team changes, the players' position remains.
If one team keeps the right to serve the ball, the two players of that team swap places, so the same player serves again.
The team, that scored last, serves next.

This is where you come to help them out.
Your task:
Your task is to take the scores in order and return the position for all four players according to the rules as well as the player, who has to serve next.
Specification:
Input:
Input is a string / array / set / whatever you like containing all scores in the order they are scored.
Example: "0:0, 0:1, 0:2, 1:2, 1:3" or ["0:0", "0:1", "0:2", "1:2", "1:3"]
You may assume team 1 (the left part of the score) served first in the beginning.
The input is not secured to be valid!
Output:
Your program / function / script has to output an ASCII-art style badminton court (don't care about orientation) with the position of the players and some representation of the player serving next (a single line saying Next to serve is >Player1< is enough).
Example output of the example given above ("0:0, 0:1, 0:2, 1:2, 1:3"):
|-----|-----|
|-Jim-|-Bob-| //Team 1
|###########|
|-P4--|-P3--| //Team 2
|-----|-----|
Player P4 of team 2 serves next.

The players are named Jim, Bob, P3 and P4. P3 and P4 swap their places after scoring "0:2" and keeping the right to serve. Jim and Bob never scored two times in a row and thus never swap places.
Last notes about input and output:

Input is assumed to be always in order with the first (left) score to be team 1, which may be assumed to have served first.
The names of the players are irrelevant as long as it is documented which player belongs to which team.
Team 1 is always the upper/left team in your output.
Even though a usual badminton round ends when one team scores 21 (without overtime), you may assume the game to be as long as the two teams want to play.
Sometimes the input may be incomplete (missing a score). Then your program has to output an error message indicating invalid input (E for Error! is enough for golfing reasons).

Scoring:
This is code-golf, so the least amount of bytes wins.
There are bonuses to claim though:

-20% if you output the court and server for every single serve.
-10% if your program allows to choose the serving team.
-15% if the user can choose the names for the players.

The bonus percentages are first added and then applied to the byte count, resulting in a maximum bonus of 45%!
Test cases (so you don't have to come up with your own):
(Strings only, including output and validation):
Example1:
0:0, 1:0, 2:0, 3:0, 3:1, 3:2, 4:2, 4:3, 5:3, 6:3, 6:4, 7:4, 7:5, 7:6, 8:6, 8:7, 9:7, 10:7, 11:7, 12:7, 12:8, 12:9, 13:9

Output:
|-----|-----|
|-Bob-|-Jim-| //Team 1
|###########|
|-P4--|-P3--| //Team 2
|-----|-----|
Player Jim of team 1 serves next.

Example2:
0:0, 0:1, 0:2, 1:2, 2:2, 3:3, 4:3, 4:4 -> Invalid
                          /\              Both teams can't score at the same time/missing intermediate score

Output:
Invalid input! Please check input and try again.

In case you have questions or need clarification, please ask so I can improve the challenge.

Nice challenge! Just a question though - does the error message have to exactly match the one in the test case? "Appropriate error message" seems a little ambiguous to me - seeing as this is code-golf, one might argue that "E" is their error message or something.

It's just for clarification. Because this is code-golf, "E" is enough for an error message.

Python 2: 320 chars - 45% = 176
def f(n,t,s):
 for l,r in zip(s,s[1:]):
  d=[r[0]-l[0],r[1]-l[1]]
  if[0,1]!=sorted(d):print'E';break
  if d[1]==t:v=2*t;n[v:v+2]=n[v:v+2][::-1]
  t=d[1];m=max(map(len,n))+2;z=('|'+'-'*m)*2;c='|{:^%d}'%m;print'|\n'.join([z,c*2,'|#'+'#'*2*m,c*2,z,'Player {} of team {} serves next.\n']).format(*n+[n[2*t+(t+r[t])%2],t+1])

I'm not happy with lots of things. For instance the line d=[r[0]-l[0],r[1]-l[1]] is so ugly. But spend quite some time in golfing this.
Claims all 3 bonuses.
Please tell me, if I my output is not entirely the way you wanted. The question was not very clear.
Usage:
This defines a python method. The parameters are a list of strings (the names of the players), an integer 0 or 1 (serving team) and a list of tuples of the scores.
f(["Jim","Bob","P3","P4"],0,[(0, 0), (0, 1), (0, 2), (1, 2), (1, 3)])
f(["Jim","Bob","A","Montgomery"],0,[(0, 0), (1, 0), (2, 0), (3, 0), (3, 1), (3, 2), (4, 2), (4, 3), (5, 3), (6, 3), (6, 4), (7, 4), (7, 5), (7, 6), (8, 6), (8, 7), (9, 7), (10, 7), (11, 7), (12, 7), (12, 8), (12, 9), (13, 9)])
f(["Jim","Bob","P3","P4"],0,[(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (3, 3), (4, 3), (4, 4)])

Output:
|-----|-----|
| Jim | Bob |
|###########|
| P4  | P3  |
|-----|-----|
Player P4 of team 2 serves next.

|------------|------------|
|    Bob     |    Jim     |
|#########################|
| Montgomery |     A      |
|------------|------------|
Player Jim of team 1 serves next.

E

This is of course shortened, for the full output visit http://pastebin.com/AzbnEbaH.

The output is looks exactly like what I'm looking for. If you have questions about rules, please ask so I can improve the challenge.

@GiantTree What does an even score mean? Is 1:3 (1+3=4) even, or is 2:? even for team 1 and ?:2 even for team 2. I figured the second option.
And the question never says, when the serving team changes. I figured, when they make a mistake.
I was a little bit confused about these two clarification, searched for the official rules via Youtube, and there someone explained complete different rules.

"Even" means a score divisible by 2/the score is a multiple of 2 (eg. 0, 2, 4, 6 etc.). Oh, it looks like I missed out that the team that scored last serves next, sorry about that.


text:
Implement range function without using numbers in code
You have to create a function range, such that it takes two (integer) arguments a and b (a < b) and returns all the numbers in between them. So:
range(5, 10) // should output 6, 7, 8, 9
range(-5, 2) // should output -4, -3, -2, -1, 0, 1
range(5, 0) // can throw an error/empty/null/undefined/whatever (a is not < b)
// bonus points for non integer handling
range(0.5, 4.5) // 1.5, 2.5, 3.5
range(0.5, 4) // range doesn't make sense, error/null/empty
range(5, 5) // etc. should return empty/null/undefined/whatever

Your code must not use any numbers at all, but you can use arithmetic operators. If your language has a range function in-built, you cannot use that as well.
Shortest code wins.

Even if I was writing this in normal code without constraints, I doubt I would have any reason to use numeric literals.

Hello, and welcome to PPCG. "bonus points for non integer handling" is not specific enough for this site. You should either define absolute measures (e.g. -10 bytes) or remove this part from your question.

I decided to close this as a duplicate, as the source restriction seems irrelevant (as feersum said). Of course, the other challenge required to implement the step width as well, but that seems like a trivial thing to change. Of course, anyone who disagrees is welcome to cast reopen votes.

For me it is not a duplicate; yes one can prefer range has its extremes instead of esclude them so 1..4 is 1 2 3 4

Javascript (49)(45)
As feersum said, I do not know why anyone would have to use numbers here.
f=(a,b)=>{for(c=[];a<b;c.push(a++));return c}

Old:
f=(a,b)=>{c=[];for(;a<b;a++){c.push(a);}return c}

I am sure it can be golfed down further=)

I believe it has to be named range


text:
Words within words within words within words . . .
In this pixelated font of uppercase letters of the alphabet, all the characters are 5 units wide and 5 tall.
 ███  ████   ███  ████  █████ █████  ████ █   █ █████     █ █   █ █     █   █
█   █ █   █ █   █ █   █ █     █     █     █   █   █       █ █  █  █     ██ ██
█████ ████  █     █   █ ████  ████  █  ██ █████   █       █ ███   █     █ █ █
█   █ █   █ █   █ █   █ █     █     █   █ █   █   █   █   █ █  █  █     █   █
█   █ ████   ███  ████  █████ █      ████ █   █ █████  ███  █   █ █████ █   █

█   █  ███  ████   ███  ████   ████ █████ █   █ █   █ █   █ █   █ █   █ █████
██  █ █   █ █   █ █   █ █   █ █       █   █   █ █   █ █   █  █ █   █ █     █
█ █ █ █   █ ████  █   █ ████   ███    █   █   █  █ █  █ █ █   █     █     █
█  ██ █   █ █     █  ██ █  █      █   █   █   █  █ █  █ █ █  █ █    █    █
█   █  ███  █      ████ █   █ ████    █    ███    █    █ █  █   █   █   █████

There is also 1 unit of space between letters and between lines, as can be seen. So each letter can take up to 6×6 units of space.
Suppose that instead of using the full block character (█) to directly form the shapes of the letters, we wanted to use other letters in the same font. This involves increasing the dimensions of the text 6-fold so that letters made of full-blocks can be used as full-block replacements in the larger text.
If that didn't make sense hopefully this example will. Here is an A made of B's using the pixelated font:
      ████  ████  ████
      █   █ █   █ █   █
      ████  ████  ████
      █   █ █   █ █   █
      ████  ████  ████

████                    ████
█   █                   █   █
████                    ████
█   █                   █   █
████                    ████

████  ████  ████  ████  ████
█   █ █   █ █   █ █   █ █   █
████  ████  ████  ████  ████
█   █ █   █ █   █ █   █ █   █
████  ████  ████  ████  ████

████                    ████
█   █                   █   █
████                    ████
█   █                   █   █
████                    ████

████                    ████
█   █                   █   █
████                    ████
█   █                   █   █
████                    ████

The B's are made of full blocks and the A is made of B's. Notice that the B's still have one unit between them horizontally and vertically.
We can extend this idea by using words instead of just letters. Here is "WATER" made of "FIRE":
█████                   █████             ████  █████ █████             █████ ████  █████ █████ █████       ████  █████ █████ █████ ████        █████ █████ █████ ████
█                         █               █   █ █     █                   █   █   █ █     █       █         █   █ █     █       █   █   █       █     █       █   █   █
████                      █               ████  ████  ████                █   ████  ████  ████    █         ████  ████  ████    █   ████        ████  ████    █   ████
█                         █               █  █  █     █                   █   █  █  █     █       █         █  █  █     █       █   █  █        █     █       █   █  █
█                       █████             █   █ █████ █                 █████ █   █ █████ █     █████       █   █ █████ █     █████ █   █       █████ █     █████ █   █

█████                   █████       ████                    █████                   █████                   █████                               ████                    █████
█                         █         █   █                   █                       █                         █                                 █   █                   █
████                      █         ████                    ████                    ████                      █                                 ████                    ████
█                         █         █  █                    █                       █                         █                                 █  █                    █
█                       █████       █   █                   █████                   █                       █████                               █   █                   █████

█████       █████       ████        █████ █████ █████ ████  █████                   █████                   █████ ████  █████ █████             █████ ████  █████ █████
█             █         █   █       █     █       █   █   █ █                       █                         █   █   █ █     █                   █   █   █ █     █
████          █         ████        ████  ████    █   ████  ████                    ████                      █   ████  ████  ████                █   ████  ████  ████
█             █         █  █        █     █       █   █  █  █                       █                         █   █  █  █     █                   █   █  █  █     █
█           █████       █   █       █████ █     █████ █   █ █████                   █                       █████ █   █ █████ █                 █████ █   █ █████ █

█████       █████       ████        █████                   █████                   █████                   ████                                █████             █████
█             █         █   █       █                       █                         █                     █   █                               █                 █
████          █         ████        ████                    ████                      █                     ████                                ████              ████
█             █         █  █        █                       █                         █                     █  █                                █                 █
█           █████       █   █       █████                   █                       █████                   █   █                               █████             █

      █████       █████             ████                    █████                   █████                   █████ ████  █████ █████ █████       ████                    █████
      █             █               █   █                   █                       █                         █   █   █ █     █       █         █   █                   █
      ████          █               ████                    ████                    ████                      █   ████  ████  ████    █         ████                    ████
      █             █               █  █                    █                       █                         █   █  █  █     █       █         █  █                    █
      █           █████             █   █                   █████                   █                       █████ █   █ █████ █     █████       █   █                   █████

Notice how "FIRE" appears repeatedly on each line, and always in order, no matter how much space is between the letters. Three of the rightmost instances of "FIRE" were cut off early because of how "WATER"'s letters are shaped.
This idea can be expanded even further, by using these words made of words to make words made of words made of words, or even words made of words made of words made of words. There is no limit theoretically.
Another example would put this post over the 30k character limit, but you can see what is meant by "words made of words made of words" by running this nifty Stack Snippet. Just leave the parameters at their defaults and press "Go!". You should see the word "DOG" made of the word "CAT" made of the word "MOUSE".

alphabet = {A:[[0,1,1,1,0,0],[1,0,0,0,1,0],[1,1,1,1,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],C:[[0,1,1,1,0,0],[1,0,0,0,1,0],[1,0,0,0,0,0],[1,0,0,0,1,0],[0,1,1,1,0,0],[0,0,0,0,0,0]],B:[[1,1,1,1,0,0],[1,0,0,0,1,0],[1,1,1,1,0,0],[1,0,0,0,1,0],[1,1,1,1,0,0],[0,0,0,0,0,0]],E:[[1,1,1,1,1,0],[1,0,0,0,0,0],[1,1,1,1,0,0],[1,0,0,0,0,0],[1,1,1,1,1,0],[0,0,0,0,0,0]],D:[[1,1,1,1,0,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[1,1,1,1,0,0],[0,0,0,0,0,0]],G:[[0,1,1,1,1,0],[1,0,0,0,0,0],[1,0,0,1,1,0],[1,0,0,0,1,0],[0,1,1,1,1,0],[0,0,0,0,0,0]],F:[[1,1,1,1,1,0],[1,0,0,0,0,0],[1,1,1,1,0,0],[1,0,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,0]],I:[[1,1,1,1,1,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[1,1,1,1,1,0],[0,0,0,0,0,0]],H:[[1,0,0,0,1,0],[1,0,0,0,1,0],[1,1,1,1,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],K:[[1,0,0,0,1,0],[1,0,0,1,0,0],[1,1,1,0,0,0],[1,0,0,1,0,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],J:[[0,0,0,0,1,0],[0,0,0,0,1,0],[0,0,0,0,1,0],[1,0,0,0,1,0],[0,1,1,1,0,0],[0,0,0,0,0,0]],M:[[1,0,0,0,1,0],[1,1,0,1,1,0],[1,0,1,0,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],L:[[1,0,0,0,0,0],[1,0,0,0,0,0],[1,0,0,0,0,0],[1,0,0,0,0,0],[1,1,1,1,1,0],[0,0,0,0,0,0]],O:[[0,1,1,1,0,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,1,1,1,0,0],[0,0,0,0,0,0]],N:[[1,0,0,0,1,0],[1,1,0,0,1,0],[1,0,1,0,1,0],[1,0,0,1,1,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],Q:[[0,1,1,1,0,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,0,1,1,0],[0,1,1,1,1,0],[0,0,0,0,0,0]],P:[[1,1,1,1,0,0],[1,0,0,0,1,0],[1,1,1,1,0,0],[1,0,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,0]],S:[[0,1,1,1,1,0],[1,0,0,0,0,0],[0,1,1,1,0,0],[0,0,0,0,1,0],[1,1,1,1,0,0],[0,0,0,0,0,0]],R:[[1,1,1,1,0,0],[1,0,0,0,1,0],[1,1,1,1,0,0],[1,0,0,1,0,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],U:[[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,1,1,1,0,0],[0,0,0,0,0,0]],T:[[1,1,1,1,1,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,0,0,0,0]],W:[[1,0,0,0,1,0],[1,0,0,0,1,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[0,1,0,1,0,0],[0,0,0,0,0,0]],V:[[1,0,0,0,1,0],[1,0,0,0,1,0],[0,1,0,1,0,0],[0,1,0,1,0,0],[0,0,1,0,0,0],[0,0,0,0,0,0]],Y:[[1,0,0,0,1,0],[0,1,0,1,0,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,1,0,0,0],[0,0,0,0,0,0]],X:[[1,0,0,0,1,0],[0,1,0,1,0,0],[0,0,1,0,0,0],[0,1,0,1,0,0],[1,0,0,0,1,0],[0,0,0,0,0,0]],Z:[[1,1,1,1,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0],[0,1,0,0,0,0],[1,1,1,1,1,0],[0,0,0,0,0,0]]}

empty = ['\xA0', '.']
full = ['\u2588', 'X']
w = 6
h = 6

function makeGrid(height, width) {
    var grid = new Array(height)
    for(var y = 0; y < height; y++) {
        grid[y] = new Array(width)
    }
    return grid
}

function unfoldGrid(grid) {
    var newGrid = makeGrid(h * grid.length, w * grid[0].length)
    for (var y = 0; y < newGrid.length; y++) {
        for (var x = 0; x < newGrid[0].length; x++) {
            var yf = Math.floor(y / h), xf = Math.floor(x / w)
            if (grid[yf][xf] != 0) {
                newGrid[y][x] = grid[yf][xf][y % h][x % w]
            } else {
                newGrid[y][x] = 0
            }
        }
    }
    return newGrid
}

function makeWords(words, empty, full) {
    var grid = makeGrid(1, words[0].length)
    for (var i = 0; i < words[0].length; i++) {
        grid[0][i] = alphabet[words[0][i]]
    }
    console.log(grid.length)
        console.log(grid[0].length)
    grid = unfoldGrid(grid)

        console.log(grid.length)
        console.log(grid[0].length)
    for(var i = 1; i < words.length; i++) {
        for (var y = 0; y < grid.length; y++) {
            var offset = 0
            for (var x = 0; x < grid[0].length; x++) {
                if (grid[y][x]) {
                    grid[y][x] = alphabet[words[i][offset++ % words[i].length]]
                }
            }
        }
        grid = unfoldGrid(grid)
    }

    var output = ''

    var height = Math.pow(h, words.length) - (Math.pow(h, words.length) - 1) / (h - 1)
    var width = words[0].length * Math.pow(w, words.length) - (Math.pow(w, words.length) - 1) / (w - 1)

    for (var y = 0; y < height; y++) {
        for (var x = 0; x < width; x++) {
            output += grid[y][x] ? full : empty
        }
        if (y + 1 != height) {
            output += '\r\n'
        }
    }

    return output
}

function go() {
    plain = document.getElementById('plain').checked ? 1 : 0
    document.getElementById('canvas').value = makeWords(document.getElementById('words').value.split(' '), empty[plain], full[plain])
    resize()
}

function resize() {
    document.getElementById('canvas').style.fontSize = document.getElementById('size').value
}

function zoom(magnify) {
    canvas = document.getElementById('canvas')
    match = canvas.style.fontSize.match(/^(\d+(?:\.\d+)?)(.*)$/)
    if (match !== null) {
        number = parseFloat(match[1])
        unit = match[2]
        canvas.style.fontSize = document.getElementById('size').value = (number + (magnify ? 0.1 : -0.1)) + unit
    }
}
#canvas {
    font-family: Consolas, "Courier New", sans-serif;
    white-space: nowrap; overflow: auto;
    width: 6in;
    height: 3in;
}

Words: <input type='text' id='words' value='DOG CAT MOUSE'> <button type='button' onclick='go()'>Go!</button> Plain ASCII <input type='checkbox' id='plain'>

Font Size: <input type='text' id='size' value='0.4mm'> <button type='button' onclick='resize()'>Resize</button> <button type='button' onclick='zoom(1)'>+</button> <button type='button' onclick='zoom(0)'>-</button> (use any unit: in, cm, mm, em, pt, px)

<textarea id='canvas'></textarea>

Typing any space separated list of words containing only capital letters in the textbox will produce the first word made of the second word made of the third, made of the fourth, made of ... etc.
WARNING: Entering more than 4 or even 3 words will produce A LOT of text and take a LONG time. It may crash your browser/computer/car.
Challenge
The goal of this challenge is to mirror what the Stack Snippet does in the fewest number of characters.
You must write a program that takes in a space separated string of words containing only capital letters, and outputs the first word "made of" the second "made of" the third and so on, using the pixelated font given above.
The "Plain ASCII" checkbox and the font size features of the snippet do not need to be supported in your program. Mirroring the transformation from lists of words to words made of words is the main point and only requirement.
Details

Input should come from stdin, the command line, or you may just write a function that takes a string.
You may assume the input is always valid, i.e. a string of words made of capital letters, separated by exactly one space, with no leading or trailing spaces.
Output should go to stdout (or similar alternative) or to a file with the name of your choice.
The output should consist entirely of empty-space characters, full-space characters, and newlines.

The empty/full-space characters should either be space and full block (, █) respectively, or period and X (., X) respectively.

The output should not contain any leading columns containing only empty-space characters, though any combination of trailing empty-space characters on any lines is allowed.

So this is allowed:
X...X.XXXXX..
X...X.X
X.X.X.XXXX....
X.X.X.X..
.X.X..XXXXX..

But this isn't:
.X...X.XXXXX..
.X...X.X
.X.X.X.XXXX....
.X.X.X.X..
..X.X..XXXXX..

There should be no leading or trailing rows containing only empty-space characters. A single trailing newline is optionally allowed.

Here is a more string-friendly version of the font:
.XXX.
X...X
XXXXX
X...X
X...X

XXXX.
X...X
XXXX.
X...X
XXXX.

.XXX.
X...X
X....
X...X
.XXX.

XXXX.
X...X
X...X
X...X
XXXX.

XXXXX
X....
XXXX.
X....
XXXXX

XXXXX
X....
XXXX.
X....
X....

.XXXX
X....
X..XX
X...X
.XXXX

X...X
X...X
XXXXX
X...X
X...X

XXXXX
..X..
..X..
..X..
XXXXX

....X
....X
....X
X...X
.XXX.

X...X
X..X.
XXX..
X..X.
X...X

X....
X....
X....
X....
XXXXX

X...X
XX.XX
X.X.X
X...X
X...X

X...X
XX..X
X.X.X
X..XX
X...X

.XXX.
X...X
X...X
X...X
.XXX.

XXXX.
X...X
XXXX.
X....
X....

.XXX.
X...X
X...X
X..XX
.XXXX

XXXX.
X...X
XXXX.
X..X.
X...X

.XXXX
X....
.XXX.
....X
XXXX.

XXXXX
..X..
..X..
..X..
..X..

X...X
X...X
X...X
X...X
.XXX.

X...X
X...X
.X.X.
.X.X.
..X..

X...X
X...X
X.X.X
X.X.X
.X.X.

X...X
.X.X.
..X..
.X.X.
X...X

X...X
.X.X.
..X..
..X..
..X..

XXXXX
...X.
..X..
.X...
XXXXX

Scoring
This is code-golf so the shortest submission in bytes wins. Any instance of a full block (█) can be counted as 1 byte instead of 3 so submissions that use X don't have an advantage.

You can run the following JavaScript snippet (ex. by typing javascript: into the URL bar and pasting it) to make the ASCII art here much, much easier to read: $('#question pre').css('line-height',1). Result: http://i.stack.imgur.com/XmB8C.png

Or to include the answers $('#question pre, .answer pre').css('line-height',1)

I know it's a little too late to make this joke, but I couldn't resist: i.imgur.com/vAZi1Zt.png.

How did I miss this challenge?!

CJam, 171 165 162 161 bytes
qS/_0=,0a*a\{{W:I;{'[{RI):I=}?i65-"c¿»ÐòO*4Õ]%ÐÎ<Ã IX]{-ïèq=ô}s×o)½2~û³'é¨1ÃlØeúN!Ö3~4ÜË|ÕÇäaepý®"255b2b5/5/=}%z1af*}%R,1a*a*}fR2a*"█
"f=

I am treating █ as 1 byte. Rest all characters are well within ASCII range, so treating them as 1 byte too.
You can use this pastebin for the exact code
Example output for input:
FIRST HELLO WORLD

How it works
First of all
"c¿»ÐòO*4Õ]%ÐÎ<Ã IX]{-ïèq=ô}s×o)½2~û³'é¨1ÃlØeúN!Ö3~4ÜË|ÕÇäaepý®"255b2b5/5/

is simply the pattern for each of the 27 characters (A-Z and space) which is made up of 0 (at X positions) and 1 (at . positions). After decoding, this gives a 27 element array of 2D arrays of 5 rows and 5 columns representing X and . for each of the 27 characters. Let us call this array as L.
Now the remaining code:
qS/                      "Read the input and split it on space to get array Q";
   _0=                   "Get a copy of the first element of the above array";
      ,0a*               "Create an array filled with 0 with length of the first element";
          a\             "Wrap that array in another array and swap to get Q on top";
{  ...  }fR              "This is a for each loop on the array Q with R having the";
                         "current element value in each loop";
 {...}%                  "In the first iteration, the 0 array we created will be the";
                         "only thing on stack, in subsequent iterations, the result";
                         "of previous iteration will be on stack";
  W:I;                   "Initialize variable I with -1";
      {...}%             "Run this block on each element of the current array";
{'[{RI):I=}?i65-L=}%     "This is the above code block. In each iteration, we figure";
                         "out what character needs to be be put at the current index";
                         "Then we get the pattern of 0 and 1 for that character";
 '[{      }?             "Stack contains either 0 or 1. If it is 1, we want to leave";
                         "that index blank, so we put pattern of '[ which is 5X5 spaces";
    RI_:I=               "When we do not want a blank character, we get the next"
                         "character from R to fill the non empty space";
            i65-         "Convert A-Z  to 0-27 notation";
                L=       "Get the corresponding pattern from the pattern array L";
z1af*                    "After the above iterations, for each line of the previous";
                         "iteration's output, we get a vertical 2D array for next";
                         "iteration. We transpose it and join each character in";
                         "this line using a space";
      R,1a*a*            "After getting all lines from current iteration, we join them";
                         "with one full line of space characters";

 2a*                     "After all iterations, we have the 0 1 based 2D array for the";
                         "final output ASCII with each row representing a line. We join";
                         "these lines with 2, to get a 0 1 2 based array";
     "█                  "A brick, a space and a newline. Mapping 1 to 1 with 0 1 2";
"                        "based array";
 f=                      "For each of the 0 1 2 based array element, convert them to";
                         "one of the brick, space and new line character";

Try it online here

Python 3, 437 bytes
from numpy import*
s=input().split()
d=fromstring('NONO__^Q_PQAQQNONO^_QQQQQ_QQQQAAAQDPIA[SQQQQADQQQJJH_OAQOOY_DPGAUUQOQONDQJUDDDQQQQAAQQDQIAQYQAYIPDQJUJDBQONO_A^Q_NQ_QQNA^QODNDJQD_',byte)[:,None]>>arange(5)&1
b=0
x=1
y=len(s[0])
n=[[1]*y]
for w in s:
 g=n;b+=x;x*=6;n=zeros((x,x*y),int);i=-6
 for q in g:
  o=j=0;i+=6
  for p in q:n[i:i+5,j:j+5]|=d[ord(w[o%len(w)])-65::26]*p;o+=p;j+=6
for r in n[:-b]:print(''.join(' █'[x] for x in r))

The character shapes are encoded in ASCII. Each ASCII byte corresponds to one row of one character, with bits representing unit blocks. It isn't a very efficient scheme, but it's easy to unpack into NumPy bitmasks for each character.
We start off with a 2d array of 1s. It has one column for each character in the first word and a single row. Then, for each word, we create a new array of 0s, six times higher and six times wider than the previous array. Where the previous array had a 1, the corresponding 6x6 section of the new array is filled with the appropriate character's bitmask.
Here's an example (with an extremely small font):

CJam, 181 174 170 bytes
All those non-ASCII characters are still within the extended ASCII range, so they can all be encoded in a single byte. (Except for the █, but that one is treated specially according to the challenge spec.) Therefore, I'm counting each character as a byte.
"Á  :½A%õÍú£àËªë8!Õ*j4¶fVËa¡ùÔ¯{+ÛyéâõKn#@?
9Ôia)(Ñç;~LÒª"257b2bYYb" █"er5/5/:L;lS/_0=,'█*a\{f{W:T;\{' ={S5*a5*}{T):T1$='A-L=}?\}%W<zSf*}Sa*}/N*

Stack Exchange has probably mangled some of the unprintable characters, so you might have to copy the code from this pastebin.
Test it here.
Takes input via STDIN as a space-separated list of words. The first word is the largest scale. For instance:
HOLISM REDUCTIONISM

yields
████                    █████             ████  █   █  ███              █████                               █████  ███  █   █ █████  ████             █   █ ████  █████ ████        █   █                    ███
█   █                   █                 █   █ █   █ █   █               █                                   █   █   █ ██  █   █   █                 ██ ██ █   █ █     █   █       █   █                   █   █
████                    ████              █   █ █   █ █                   █                                   █   █   █ █ █ █   █    ███              █ █ █ ████  ████  █   █       █   █                   █
█  █                    █                 █   █ █   █ █   █               █                                   █   █   █ █  ██   █       █             █   █ █  █  █     █   █       █   █                   █   █
█   █                   █████             ████   ███   ███                █                                 █████  ███  █   █ █████ ████              █   █ █   █ █████ ████         ███                     ███

████                    █████       ████                    █   █        ███                                            █████                   █████                                ███  █   █       █████  ████
█   █                   █           █   █                   █   █       █   █                                             █                       █                                 █   █ ██  █         █   █
████                    ████        █   █                   █   █       █                                                 █                       █                                 █   █ █ █ █         █    ███
█  █                    █           █   █                   █   █       █   █                                             █                       █                                 █   █ █  ██         █       █
█   █                   █████       ████                     ███         ███                                              █                     █████                                ███  █   █       █████ ████

████  █████ ████  █   █  ███        █████                   █████        ███                                            █   █                         █████  ████ █   █             ████        █████       ████
█   █ █     █   █ █   █ █   █         █                       █         █   █                                           ██  █                           █   █     ██ ██             █   █       █           █   █
████  ████  █   █ █   █ █             █                       █         █   █                                           █ █ █                           █    ███  █ █ █             ████        ████        █   █
█  █  █     █   █ █   █ █   █         █                       █         █   █                                           █  ██                           █       █ █   █             █  █        █           █   █
█   █ █████ ████   ███   ███          █                     █████        ███                                            █   █                         █████ ████  █   █             █   █       █████       ████

████                    █████       ████                    █   █        ███                                            █████                                           █████        ███                    █   █
█   █                   █           █   █                   █   █       █   █                                             █                                               █         █   █                   ██  █
████                    ████        █   █                   █   █       █                                                 █                                               █         █   █                   █ █ █
█  █                    █           █   █                   █   █       █   █                                             █                                               █         █   █                   █  ██
█   █                   █████       ████                     ███         ███                                              █                                             █████        ███                    █   █

████                    █████             ████  █   █  ███              █████ █████  ███  █   █ █████        ████ █   █ ████  █████ ████        █   █  ███  █████ █████              ███                    █   █
█   █                   █                 █   █ █   █ █   █               █     █   █   █ ██  █   █         █     ██ ██ █   █ █     █   █       █   █ █   █   █     █               █   █                   ██  █
████                    ████              █   █ █   █ █                   █     █   █   █ █ █ █   █          ███  █ █ █ ████  ████  █   █       █   █ █       █     █               █   █                   █ █ █
█  █                    █                 █   █ █   █ █   █               █     █   █   █ █  ██   █             █ █   █ █  █  █     █   █       █   █ █   █   █     █               █   █                   █  ██
█   █                   █████             ████   ███   ███                █   █████  ███  █   █ █████       ████  █   █ █   █ █████ ████         ███   ███    █   █████              ███                    █   █

Explanation
First, we store a lookup table for letter shapes in L:
"Á  :½A%õÍú£àËªë8!Õ*j4¶fVËa¡ùÔ¯{+ÛyéâõKn#@?
9Ôia)(Ñç;~LÒª"257b2bYYb" █"er5/5/:L;

The first string just a compressed number. We treat the code points as base-257 digits, then we convert the resulting number to binary. YYb is 2 is in base 2, so it gives [1 0]. We use element substitution with " █" to turn the digits into spaces and block characters. Lastly, we split the string into rows of 5 characters, and again into blocks of 5 rows. The result is stored in L and discarded from the stack.
Now the general idea is to start with a single line of █ of the length of the largest-scale word. And then for each word we go through the existing grid, and expand all blocks to the corresponding character at the next smaller scale (while inserting empty rows and columns for separation). Here is the input preparation:
lS/_0=,'█*a\
lS/          "Read input, split on spaces.";
   _0=       "Duplicate and get first word.";
      ,'█*   "Get length repeat █ that many times.";
          a  "Wrap in array, to make the grid two-dimensional.";
           \ "Swap with word list.";

Let's look at the outermost structure of the remaining program first. The next block {...}/ is run for every word, and expands each of the block characters.
{f{...}Sa*}/N*
{         }/   "Process each word in the input.";
 f{...}        "Map this block onto each line of the grid, passing in the current word as well.";
       Sa*     "Since each original line will be turned into 5 lines, the grid is still grouped
                into blocks of 5 lines. We join them together with empty lines as required.";
            N* "Join all lines together with newlines.";

Lastly, let's look at how a single line is expanded:
W:T;\{' ={S5*a5*}{T):T1$='A-L=}?\}%
W:T;                                "Store -1 in T.";
    \                               "Swap word with line.";
     {                           }% "Map this block onto each character.";
      ' =                           "Check if the character is a space.";
         {      }{            }?    "If it is, run the first block, otherwise the second.";
          S5*                       "Create a string of five spaces.";
             a5*                    "Create an array of five such strings.";
                  T):T              "Push T, increment, store in T.";
                      1$=           "Copy the word and access the T'th character, cyclically.";
                         'A-        "Subtract A from the letter.";
                            L=      "Use the result to get the character shape from L.";
                                \   "Swap resulting block with word.";

"At this point each character is replaced with a 5x5 array of new characters.
 So we actually have a 3D array right now. Since we used a map operation, the
 current word will also be at the end of the array, which we need to get rid off.";

W<zSf*
W<     "Discard last array element - the current word.";
  z    "Zip or transpose the top two levels of the array.";
   Sf* "Join each line together with spaces.";

The result is printed automatically at the end of the program.