#!/bin/bash

# Colors for output
GREEN='\033[0;32m'
RED='\033[0;31m'
COLOROFF='\033[0m'

# Loop through the test cases
for i in 1 2 3; do
    # Run the sample execution and redirect output to {i}.out
    ./sample_execution.sh $i > "${i}.out"
    
    # Compare {i}.out with {i}.ans
    if cmp -s "${i}.out" "${i}.ans"; then
        # Files are the same
        echo -e "${GREEN}Sample ${i}: PASSED${COLOROFF}"
    else
        # Files are different
        echo -e "${RED}Sample ${i}: FAILED${COLOROFF}"
    fi
done
