跳到正文

算法·理论

究竟该如何对拍?

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

文章信息

发布
2026年7月25日
收录
2026年8月8日
更新
2026年10月14日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include <bits/stdc++.h>
using namespace std;

signed main() {
	int tmp = 0;
	while(1) {
		cout << "#Test " << ++ tmp << ": ";
		system("./gen > ABC257Ex.in");
		system("./std < ABC257Ex.in > std.out");
		system("./ABC257Ex < ABC257Ex.in > fak.out");
		if(system("diff std.out fak.out")) {
			cout << "Wrong Answer\n";
			return 0;
		} else {
			cout << "Accept\n";
		}
	}
	return 0;
}
原文