competitive programming scripts on Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
337 B

[ -d input ] || exit 127
[ ! -f input/*.in ] && echo "no tests." && exit 127
make fast || exit 1
cd input
for T in *.in; do
NAME=$(echo $T | sed "s/.in//g")
timeout 5s ../Main < $NAME.in > ../output/$NAME.txt
if [ $? -eq 124 ]; then
echo "TLE"
exit 124
elif [ $? -ne 0 ]; then
exit 1
fi
done