#!/bin/bash

TASK=delivery

echo "Generating tests"
cp 01.t 01
javac TestsGen.java
java TestsGen

cp ../"$TASK"_ats.java .

echo "Compiling solution"
javac "$TASK"_ats.java

echo "Generating answers"
for i in ??
do
	echo -ne "[$i]"
	cp $i "$TASK".in
	java "$TASK"_ats 2>/dev/null
	mv "$TASK".out $i.a
done

