Skip to content

Instantly share code, notes, and snippets.

@bruteforceboy
Created April 20, 2023 19:16
Show Gist options
  • Select an option

  • Save bruteforceboy/871054fc34403c7650a2e01dcb68a288 to your computer and use it in GitHub Desktop.

Select an option

Save bruteforceboy/871054fc34403c7650a2e01dcb68a288 to your computer and use it in GitHub Desktop.
ubuntu stress
for i in {1..100} # modify for the number of tests
do
echo $i
./gen > input.txt
./code < input.txt > output.txt
./brute < input.txt > answer.txt
if ! cmp -s output.txt answer.txt
then
echo "difference on test {$i}"
break
fi
sleep 0.5 # reduce the sleep time for faster testing, but less random tests
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment