@echo off

copy 01.t 01 >nul
copy 02.t 02 >nul
copy 03.t 03 >nul
copy 04.t 04 >nul

cl /EHsc gen_zero.cpp
cl /EHsc gen_maxtest.cpp
cl /EHsc gen_touch.cpp

echo Generating 05
gen_zero 10 789124356 > 05
echo Generating 06
gen_zero 100 89124356 > 06
echo Generating 07
gen_zero 1000 9124356 > 07
echo Generating 08
gen_zero 10000 124356 > 08
echo Generating 09
gen_zero 100000 24356 > 09

echo Generating 10
gen_maxtest  10   15 1000 78948462 > 10
echo Generating 11
gen_maxtest  11   16 9999 48948462 > 11
echo Generating 12
gen_maxtest  12   20 99997 5948462 > 12
echo Generating 13
gen_maxtest  20   31 99998 2374662 > 13
echo Generating 14
gen_maxtest  31   47 99999 8226488 > 14
echo Generating 15
gen_maxtest 499 1000 100000 180377 > 15
rem here the answer is 0, because the leftmost and rightmost do not intersect.
echo Generating 16
gen_maxtest 999 1000 100000 181377 > 16

echo Generating 17
gen_touch 493  991  99989 7894462 > 17
echo Generating 18
gen_touch 477  783  99991 4898462 > 18
echo Generating 19
gen_touch 481  609  99997 5958462 > 19
echo Generating 20
gen_touch 781  909  99998 2274662 > 20
echo Generating 21
gen_touch 691  991  99999 8266488 > 21
echo Generating 22
gen_touch 999 1000 100000 1180377 > 22

call tall mb_assert
