[OI向?] ubuntu下一些常用的技巧

想起来什么就写什么吧。

Ubuntu下的对拍程序

python是最为简便的。

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")

运行:
python pai.py

Ubuntu下.sh无法运行

sudo chmod 755 my.sh

猜你喜欢

转载自www.cnblogs.com/acxblog/p/8973690.html
OI