对拍


g++ test.cpp -o a.out
g++ bruteForce.cpp -o b.out
g++ random.cpp -o c.out
while true;
do
	./c.out >in		#generate data
	./a.out out1	#test program 
	./b.out out2	#true program
	if diff out1 out2;
	then			#compare
		echo AC
	else
		echo WA
		exit0
	fi			#endIf 0==true与C语言相反 
done				#endWhile



run:

chmod +x cmp.sh 

./cmp.sh





你可能感兴趣的:(ACM)