Skip to content

Instantly share code, notes, and snippets.

@mame

mame/t.md Secret

Created May 15, 2024 16:13
Show Gist options
  • Save mame/b4d351596e85b66d58d676001cd83db7 to your computer and use it in GitHub Desktop.
Save mame/b4d351596e85b66d58d676001cd83db7 to your computer and use it in GitHub Desktop.

好きだけど長い解答(88B)

a=(0..19).map{|j|(0..15).map{|i|n,c=m.find{_3==i/2&&_4==j/2};[n&&n[i%2+j%2*2]||? ,c]}}

つまらないけど短い解答(80B)

a=(0..19).map{[? ]*16};4.times{|i|m.map{a[_4*2+i/2][_3*2+i%2]=_1[i]||? ,_2}}

データによっては動かないチート解答(74B)

a=[];4.times{|i|m.map{(a[_4*2+i/2]||=[? ]*16)[_3*2+i%2]=_1[i]||? ,_2}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment