测评辅助代码

蓝桥杯

#include<cstdlib>
#include<sstream>
#include<string>
using namespace std;
int main(){
	int n;
	char s[50];
	stringstream ss;
	scanf("%d",&n);
	for(int i =1;i<=n;i++){
		ss.str("");
		ss.clear();
		ss<<"time ./ontest < in"<<i<<".txt "<<" > out"<<i<<".txt.my\n";
		ss.getline(s,50);
		printf("%s\n", s);
		system(s);

		ss.str("");
		ss.clear();
		ss<<"diff out"<<i<<".txt.my "<<"out"<<i<<".txt\n";
		ss.getline(s,50);
		printf("%s\n", s);
		system(s);
	}
}
posted @ 2017-04-04 18:09  xsthunder  阅读(102)  评论(0编辑  收藏  举报