#!/bin/bash
g++ std.cpp -o std -Wall
g++ my.cpp -o my -Wall
while true; do
clear
python3 creat.py
./std #<in.txt> std.out
./my #<data.in> my.out
if diff -b -B -q std.txt my.txt; then # diff -b -B -q后解俩文件是比较这俩文件的意思,-b -B -q是忽略制表符行末空格以及空行的影响。如果没差别则会返回逻辑真
echo "AC!"
else
echo "Fake! Wrong Answer!"
diff std.txt my.txt
break
fi # //if的终止标志
done # //while的终止标志