@echo off
dcc32 -cc doAll.dpr
dcc32 -cc ..\check.dpr
gcc -Wall -O2 ..\cinema_rs.c -o  ..\cinema_rs.exe
copy ..\cinema_rs.exe cinema_rs.exe >nul 2>&1
copy ..\check.exe check.exe >nul 2>&1
doAll.exe
for /L %%i in (1,1,9) do if EXIST 0%%i (
    copy 0%%i cinema.in >nul 2>&1
    cinema_rs.exe
    copy cinema.out 0%%i.a >nul 2>&1
    check.exe 0%%i 0%%i.a 0%%i.a

)
for /L %%i in (10,1,99) do if EXIST %%i (
    copy %%i cinema.in >nul 2>&1
    cinema_rs.exe
    copy cinema.out %%i.a >nul 2>&1
    check.exe %%i %%i.a %%i.a
)
