跳到正文

科技·工程

对拍

kevin1616约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年7月10日
收录
2025年12月12日
更新
2026年11月16日
篇幅
约 1 分钟
获赞
3

版本

  1. v1当前
C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
const int T = 500; //对拍的次数
int main(){
	srand(time(0));
	for(int i = 1;i <= T;i++){
		freopen("xxx.in","w",stdout);
    //此处是生成输入的代码
		fclose(stdout);
		system("tj.exe < xxx.in > xxx.out");
		system("mine.exe < xxx.in > xxx.ans");
		if(system("fc /B xxx.out xxx.ans > nul")){
			cerr << "Wrong Answer on #" << i << "\n";
			break;
		}
		else cerr << "Accepted on #" << i << "\n"; 
	}
	return 0;
}
原文
存档评论2 条抓取于