@echo off
rm log
g++ %1.cpp -O2 -o solution.exe
g++ ../src/genrand.cpp -I../src -O2 -o genrand.exe
g++ ../src/validate.cpp -O2 -o validate.exe 
g++ ../check.cpp -O2 -o check.exe 
:next
genrand.exe 0 100 >chameleon.in
validate.exe <chameleon.in || goto next
solution.exe || exit
check.exe chameleon.in chameleon.out chameleon.out 2>&1 | tee tmp 
awk '{print $4," ",$6;}' tmp >>log || exit
rm tmp
goto next