mac os 程序对拍(同Linux对拍) 以及c++文件读入
在网上翻了好久发现Windows和Linux下的程序对拍都有很多博客, 而macos下的寥寥无几, 自己摸索了一下发现macos和Linux基本相同。
准备:
test1.cpp //算法程序1
test2.cpp //算法程序2
data.cpp //数据生成器
compare.cpp //比较程序
前三个cpp大家肯定都知道怎么写, 最主要的是如何自动compare, 并且直观, 方便我们查错。
compare程序:
/********************************************
*Author* :ZZZZone
*Created Time* : 日 11/19 18:10:24 2017
*********************************************/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <stack>
#include <fstream>
#include <cassert>
#include <string>