APL+WIN, 154 or (削除) 76 (削除ここまで) 7472 bytes
Original. Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for the two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖a⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s1⌷ ̈s),2↓ ̈⌽s)⍪a←l↑a←⎕av[17+⍳26]
Try it online! Thanks to Dyalog Classic Try it online! Thanks to Dyalog Classic
APL+WIN, 154 or (削除) 76 (削除ここまで) 74 bytes
Original. Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for the two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖a⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪a←l↑a←⎕av[17+⍳26]
APL+WIN, 154 or (削除) 76 (削除ここまで) 72 bytes
Original. Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for the two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖a⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(1⌷ ̈s),2↓ ̈⌽s)⍪a←l↑a←⎕av[17+⍳26]
APL+WIN, 154 or 76(削除) 76 (削除ここまで) 74 bytes
Original. Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for the two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖(l↑a)⍪⍴ ̈s←⎕⋄⍉⌽3⊖a⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪l↑a←⎕av[17+⍳26]⍪a←l↑a←⎕av[17+⍳26]
Try it online! Thanks to Dyalog Classic Try it online! Thanks to Dyalog Classic
APL+WIN, 154 or 76 bytes
Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖(l↑a)⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪l↑a←⎕av[17+⍳26]
APL+WIN, 154 or (削除) 76 (削除ここまで) 74 bytes
Original. Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for the two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖a⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪a←l↑a←⎕av[17+⍳26]
APL+WIN, 154 or 76 bytes
Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖(l↑a)⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪l↑a←⎕av[17+⍳26]
APL+WIN, 154 bytes
Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
APL+WIN, 154 or 76 bytes
Prompts for first string followed by second. Index origin = 0:
x←⎕⋄y←⎕⋄a←⎕av[17+⍳26]⋄m←((∊⌈/26⌈ ̈(n← ̄2+ ̈⍴ ̈s)+i←a⍳↑ ̈s←x y),6)⍴' '⋄m[(↑i)+⍳↑n;0]←2↓x⋄m[↑i;1]←↑1↓x⋄m[;3]←m[;2]←(↑⍴m)↑a⋄m[∊1↓i;4]←↑1↓y⋄m[(∊1↓i)+⍳∊1↓n;5]←2↓y⋄⊖m
Try it online! Thanks to Dyalog Classic
New approach. Prompts for two strings as a nested vector:
l←∊26+⌈/⍴ ̈s←⎕⋄⍉⌽3⊖(l↑a)⍪((∊2⍴ ̈-a⍳↑ ̈⌽s)⌽1⊖⊃l↑ ̈(↑ ̈1↓ ̈s),2↓ ̈⌽s)⍪l↑a←⎕av[17+⍳26]