标签:
对拍程序
linux:
1 #!/bin/bash 2 while true;do 3 ./data > data.in 4 ./wrong < data.in > wrong.out 5 ./right < data.in > right.out 6 diff wrong.out right.out 7 if [ &? -ne 0 ] ; then break ; fi 8 done
windows:
1 @echo off 2 :loop 3 data>data.in 4 right<data.in> right.out 5 wrong<data.in> wrong.out 6 fc right.out wrong.out 7 if not errorlevel 1 goto loop 8 pause goto loop
标签:
原文地址:http://www.cnblogs.com/TenderRun/p/5628153.html