Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 16 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

outdated...

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; - concatenate -> [0,0,...,0,64,160,40,10,3]
 b4 - to base four -> [[0],[0],...,[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 »/ - reduce by maximum (merge these canvases)
  Ƭ - collect while distinct applying:
 $ Ɗ - last threetwo links as a monad - f(CanvasCanvases):
 Ż€ Ḋ€ - prefixdequeue each with(remove athe zerotop (moveline itfrom righteach canvas)
 Ṗ€ - pop eachdequeue (removediscard aCanvas of leftmost cigarette)
   - head to index dequeue{R} (removefirst the25 topof line)
these lists of canvases)
  - headtighten (to index {R} (firsta 25list of these500 canvases)
 »/ - reduce by maximum (merge thesethe canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print

outdated...

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; - concatenate -> [0,0,...,0,64,160,40,10,3]
 b4 - to base four -> [[0],[0],...,[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 »/ - reduce by maximum (merge these canvases)
  Ƭ - collect while distinct applying:
 Ɗ - last three links as a monad - f(Canvas):
 ݀ - prefix each with a zero (move it right)
 Ṗ€ - pop each (remove a cigarette)
  - dequeue (remove the top line)
  - head to index {R} (first 25 of these canvases)
 »/ - reduce by maximum (merge these canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print
25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; - concatenate -> [0,0,...,0,64,160,40,10,3]
 b4 - to base four -> [[0],[0],...,[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 Ƭ - collect while distinct applying:
 $ - last two links as a monad - f(Canvases):
 Ḋ€ - dequeue each (remove the top line from each canvas)
  - dequeue (discard Canvas of leftmost cigarette)
  - head to index {R} (first 25 of these lists of canvases)
  - tighten (to a list of 500 canvases)
 »/ - reduce by maximum (merge the canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print
added 16 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, (削除) 43 42 (削除ここまで) 4239 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y

Try it online! Try it online!

Then builds the pile, translates to characters, and prints.

outdated...

Jelly, (削除) 43 (削除ここまで) 42 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

Try it online!

Then builds the pile, translates to characters, and prints.

Jelly, (削除) 43 42 (削除ここまで) 39 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y

Try it online!

Then builds the pile, translates to characters, and prints.

outdated...

deleted 494 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 43 (削除) 43 (削除ここまで) 42 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4¤UŻ31ドルС»1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

Try it online! Try it online!

25ðṬṖ;"@ɦ(1⁄2¤‘b4¤UŻ31ドルС»1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 ¤ - nilad followed by link(s) as a nilad:
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; b4 - to base fourconcatenate -> [[1,0[0,0,0],[2,2...,0,0],[2,2,0]64,[2160,2]40,[3]]
 (a single cigarette10, reflected)3]
 ; b4 - to -base concatenatefour -> [0[[0],0[0],...,0[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 »/ - reduce by maximum (merge these canvases)
 Ƭ - collect while distinct applying:
 Ɗ - last three links as a monad - f(Canvas):
 ݀ - prefix each with a zero (move it right)
 Ṗ€ - pop each (remove a cigarette)
 Ḋ - dequeue (remove the top line)
 ḣ - head to index {R} (first 25 of these canvases)
 »/ - reduce by maximum (merge these canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print

42 bytes

...if we are allowed leading whitespace:

25ð"@ɦ(1⁄2¤‘b4UŻ8¡Ż31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

TIO

Jelly, 43 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4¤UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

Try it online!

25ðṬṖ;"@ɦ(1⁄2¤‘b4¤UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 ¤ - nilad followed by link(s) as a nilad:
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 b4 - to base four -> [[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 (a single cigarette, reflected)
 ; - concatenate -> [0,0,...,0,[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 »/ - reduce by maximum (merge these canvases)
 Ƭ - collect while distinct applying:
 Ɗ - last three links as a monad - f(Canvas):
 ݀ - prefix each with a zero (move it right)
 Ṗ€ - pop each (remove a cigarette)
 Ḋ - dequeue (remove the top line)
 ḣ - head to index {R} (first 25 of these canvases)
 »/ - reduce by maximum (merge these canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print

42 bytes

...if we are allowed leading whitespace:

25ð"@ɦ(1⁄2¤‘b4UŻ8¡Ż31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

TIO

Jelly, (削除) 43 (削除ここまで) 42 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y

Try it online!

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルС»/Ż€Ṗ€ḊƊƬḣ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; - concatenate -> [0,0,...,0,64,160,40,10,3]
 b4 - to base four -> [[0],[0],...,[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 »/ - reduce by maximum (merge these canvases)
 Ƭ - collect while distinct applying:
 Ɗ - last three links as a monad - f(Canvas):
 ݀ - prefix each with a zero (move it right)
 Ṗ€ - pop each (remove a cigarette)
 Ḋ - dequeue (remove the top line)
 ḣ - head to index {R} (first 25 of these canvases)
 »/ - reduce by maximum (merge these canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print
added 299 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading
added 31 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading
added 31 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading

AltStyle によって変換されたページ (->オリジナル) /