#!/bin/bash
rm -rf tests
mkdir tests
rm -rf preliminary
mkdir preliminary
pushd src
javac TestsGen.java
java TestsGen
popd

for i in tests/??;
do
        java -Xmx2G -Xss1G Validate < $i || exit 1
echo -n $i
    cp $i capitals.in 
    time ./capitals_yp_n2 || exit 1
    mv capitals.out ${i}.yp
    time ./capitals_pkun_nlogn || echo FAIL $i
    mv capitals.out ${i}.a
#    java capitals_sm_slow_nd || exit 1
#    mv capitals.out ${i}.sm
done
