c++ windows下对拍

c++ windows下对拍程序笔记

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
	while(1){
		system("Untitled3.exe>data.in");//造数据的exe
		system("Untitled1.exe<data.in>1.out");//程序1号
		system("Untitled2.exe<data.in>2.out");//程序2号
		if(system("fc 1.out 2.out")){//fc是比较指令
			printf("error!!\n");
			system("pause");
		}
	}
	return 0;
}

记住写法 说不定会有用的

发布了4 篇原创文章 · 获赞 0 · 访问量 101

猜你喜欢

转载自blog.csdn.net/qq_43665203/article/details/100145620