。。。一把辛酸泪
码一下对拍程序:
1 while true; do 2 ./3>4810.in #出数据 3 ./1<4810.in>cuo.out #被测程序 4 ./2<4810.in>dui.out #正确(暴力)程序 5 if diff dui.out cuo.out; then #比较两个输出文件 6 printf "AC\n" #结果相同显示AC 7 8 elif diff -B -b dui.out cuo.out; then 9 printf "PE\n" 10 11 else 12 printf "WA\n" #结果不同显示WA,并退出 13 exit 0 14 fi 15 done
还是有点难背
时间: 2024-11-04 10:39:05