[NONE]Ubuntu对拍脚本
g++ gen.cpp -o gen
g++ my.cpp -o my
g++ std.cpp -o std
i=1
while true; do
./gen > data.in
./std < data.in > std.out
./my < data.in > my.out
if diff my.out std.out; then
echo test$i.......AC
else
echo WAI!!!!!
cat data.in
exit 0
fi
i=$(($i+1))
done
用法:
gedit run.sh
贺进去
chmod 777 run.sh
./run.sh