跳到正文

个人记录

CSP 对拍程序

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

文章信息

发布
2020年11月6日
收录
2026年3月8日
更新
2026年11月8日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include <bits/stdc++.h>
// Linux 下 system 在 stdlib.h 中

using namespace std;

int main() {
	for(int i = 1; i <= 5000; i++) { // 设定对拍组数
    	system("./rand");
        system("./violent");
        system("./std");
        // 造数据 跑暴力 跑正解
        printf("Test Case %d : ", i);
        if(system("diff violent.out std.out")) {
        	printf("Wrong Answer, See the output file.\n");
            return 0;
        } // 对比 不同于 Windows 的 fc
        else printf("Accepted.\n");
    }
	return 0;
}
原文