Write what comes to mind.
Matchmaking program under Ubuntu
python is the easiest.
from os import system
while True:
system("./make > in")
system("./std < in > b")
system("./my < in > s")
if(system("diff -bB s b")):
print("MMP")
exit(0)
print("pass")
run:
python pai.py
.sh cannot run under Ubuntu
sudo chmod 755 my.sh