程序对拍器

对拍器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
g++ -std=c++11 my.cpp -o my
g++ -std=c++11 data.cpp -o data
g++ -std=c++11 ac.cpp -o ac
while true; do
./data > in
./my < in > my.out
./ac < in > ac.out
if diff my.out ac.out; then
((var++))
echo $var
else
printf "WA\n"
exit 0
fi
done