Skip to content

Instantly share code, notes, and snippets.

@Michcioperz
Created November 3, 2016 20:50
Show Gist options
  • Save Michcioperz/ef2b72fbac6572780e60921c16177288 to your computer and use it in GitHub Desktop.
Save Michcioperz/ef2b72fbac6572780e60921c16177288 to your computer and use it in GitHub Desktop.
gotowiec Piotrka
#!/bin/bash
g++ -o sol sol.cpp
for((i=0;i<100;i++)) do
echo "Test $i"
./sol < fla$i.in > wyj.out
diff -w -q wyj.out fla$i.out
[[ $? -ne 0 ]] && break
done
#!/bin/bash
g++ -o sol sol.cpp
g++ -o gene gene.cpp
g++ -o brut brut.cpp
for((i=1;i<=100;i++)) do
echo "Test $i"
echo $i | ./gene > dane.in
./sol < dane.in > wyj1.out
./brut < dane.in > wyj2.out
diff -w -q wyj1.out wyj2.out
[[ $? -ne 0 ]] && break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment