Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear
- sol=$2
- # echo $sol
- g++ -std=c++17 $2 -o solD
- problem=$1
- cp solD tester/$problem
- cd tester/$problem
- RED='\033[0;31m'
- GREEN='\033[032m'
- NC='\033[0m' # No Color
- # n=`tput sgr0`
- # printf "I ${RED}love${NC} Stack Overflow\n"
- infiles=(`ls in*.txt`)
- # echo ${infiles[@]}
- for ((i=0; i<${#infiles[@]}; i++)); do
- echo "Test Case: #$i"
- ./solD < in$i.txt > you.txt
- diff -w -y out$i.txt you.txt && printf "${GREEN}Accepted${NC}" || printf "${RED}Wrong Answer on Test $i${NC}"
- echo
- # diff out$i.txt you.txt>new && echo "#$i Accepted"
- # || echo "Your Output: " || cat you.txt || echo "Expected Output: "cat out$i.txt
- # diff -w out$i.txt you.txt > new || f=1
- # cat $f
- # echo $st
- # then
- # cat out$i.txt
- # echo
- # cat yout$i.txt
- # # elif
- # # echo "#$i Accepted"
- # fi
- done
- echo
- cd ..
- # ./diff.sh $problem
- cd ..
Add Comment
Please, Sign In to add comment