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 Revisions

4 of 5
saved 1 byte
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (ES6), (削除) 132 128 120 (削除ここまで) 119 bytes

Non-centered crates are shifted to the right.

f=(a,x=W=a.every(c=>w+=W=c,w=y=0)+w*W)=>(q=W-a[y/w|0]*w)?` *
`[--x?-~y%w<2|(X=q/2+x)%w<2&&X>=q&X<W:++y&&2]+f(a,x||W):''

Try it online!

Arnauld
  • 205.5k
  • 21
  • 187
  • 670

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