想起来什么就写什么吧。

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

另存为pai.py

make是你的生成数据程序
std是你的暴力正解,my是你的对拍正解。

整个过程大概是运行make,输出重定向至文件in
然后输入重定向,运行std和my,分别输出重定向至sb
然后用diff进行比对,如果出错则停止。

终端中运行:
python pai.py

Ubuntu下.sh无法运行

sudo chmod 755 my.sh

可视化比对(diff)工具

安装:
sudo apt install meld

运行(在终端输入):
meld

你也可以按右上方的dash来进行查找。

据说能加快应用启动速度的东西(16.04):

sudo apt install preload
装好就可以不用管了的样子....

相关文章:

  • 2022-01-14
  • 2021-11-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-05-16
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-12-18
  • 2022-01-09
  • 2021-10-26
相关资源
相似解决方案