Skip to content

Instantly share code, notes, and snippets.

@hryniuk
Created June 20, 2018 12:35
Show Gist options
  • Save hryniuk/f25bb984eb5e2d40955f93df5bddb6f7 to your computer and use it in GitHub Desktop.
Save hryniuk/f25bb984eb5e2d40955f93df5bddb6f7 to your computer and use it in GitHub Desktop.
Run tests agains given task (e.g. Codeforces)
#!/bin/bash
n=$1
g++ -o ${n} ${n}.cpp -std=c++14 -O2
for i in {0..10} ; do
if [[ -e ${n}${i}.in ]] ; then
./${n} < ${n}${i}.in > ${n}${i}.xd
diff -w -q ${n}${i}.xd ${n}${i}.out
echo "${n}${i}.in $?"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment