>>903 bat
@echo off &setlocal enabledelayedexpansion
if "%~1"=="" set "this=%~0" &"%~0" "□"
set /a n=0, Hmax=0
:GET_ARG
set "arg%n%=%~1"
set "arg%n%=!arg%n%:_=0 !"
set "arg%n%=!arg%n%:□=1 !"
shift
if not "%~1"=="" set /a n+=1 &goto :GET_ARG
for /L %%i in (0,1,%n%) do ( set h=0
for %%b in (!arg%%i!) do set /a a[%%i;!h!]=%%b, h+=1
if !h! GTR !Hmax! set /a Hmax=h
)
set /a t=n+Hmax, Hmax-=1
for /L %%a in (0,1,%t%) do for /L %%b in (0,1,%t%) do set R[%%a;%%b]=0
for /L %%a in (0,1,%n%) do for /L %%b in (0,1,%Hmax%) do (
set /a A=%%a+%%b, B=a+1, C=n+%%b-%%a, D=c+1
set /a "R[!A!;!C!]|=a[%%a;%%b], R[!A!;!D!]|=a[%%a;%%b], R[!B!;!C!]|=a[%%a;%%b], R[!B!;!D!]|=a[%%a;%%b]"
REM orをxorに替えればアウトライン表示
)
:: for /L %%A in (0,1,%t%) do (for /L %%B in (0,1,%t%) do set "P%%A=!P%%A!!R[%%A;%%B]!") &echo !P%%A!
for /L %%A in (0,1,%t%) do (
for /L %%B in (0,1,%t%) do (
set /a "M=%%A+%%B, M%%=2"
if "!R[%%A;%%B]!"=="0" (set "S%%A=!S%%A! ") else if "!M!"=="0" (set "S%%A=!S%%A!/") else set "S%%A=!S%%A!\"
)
echo=!S%%A!
)
endlocal
if not "%~0"=="_□□□" "%this%" "___□" "□□_□" "_□□□"
pause &exit /b