shell语言
【Shell脚本攻略】-shell中各种括号()、(())、[]、[[]]、{}的作用
Shell $0, $#, $*, $@, $?, $$和命令行参数
#!/bin/bash
g++ random.cpp -o random
g++ my.cpp -o my
g++ std.cpp -o std
i=1
while true; do
i=$((i+1))
./random > in${i}.in
./std < in${i}.in > std.out
./my < in${i}.in > my.out
diff std.out my.out
if [ $? -ne 0 ]
then
echo test ${i} WA
break
else
echo test ${i} AC
fi
done
测运行时间我是拒绝的