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.

15 lines
337 B

3 years ago
  1. [ -d input ] || exit 127
  2. [ ! -f input/*.in ] && echo "no tests." && exit 127
  3. make fast || exit 1
  4. cd input
  5. for T in *.in; do
  6. NAME=$(echo $T | sed "s/.in//g")
  7. timeout 5s ../Main < $NAME.in > ../output/$NAME.txt
  8. if [ $? -eq 124 ]; then
  9. echo "TLE"
  10. exit 124
  11. elif [ $? -ne 0 ]; then
  12. exit 1
  13. fi
  14. done