跳到正文

linan02135qin

1320750

这个家伙不懒,但也差不多了

在洛谷打开
资料、奖项与版本

资料

编号
1320750
抓取

奖项

2025 CSP-J
二等奖
2025 CSP-S
三等奖

对拍

C++
#include <bits/stdc++.h>
using namespace std;
int check(int i)
{
	cout<<"check:"<<i<<endl;
	system("./rand>rand.in");
	system("./a<rand.in>a.out");
	system("./b<rand.in>b.out");
	//linux
	int res=system("diff a.out b.out>nul");
	//windows
	//int res=system("fc a.out b.out>nul");
	return res;
}
int main()
{
	int x;
	cin>>x;
	for(int i=1;i<=x;i++)
	{
		if(!check(i))
		{
			continue;
		}
		else
		{
			cout<<"wa in:"<<i<<endl;
			system("pause");
			break;
		}
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
int check(string a, string b)
{
	string cmd1="./a < " + a + " > ans.out";
	string cmd2="diff " + b + " ans.out > nul";
	system(cmd1.c_str());
	int res = system(cmd2.c_str());
	return res;//测试大样例
}
int main()
{
	string a, b;
	cin >> a >> b;
	if (!check(a, b))
	{
		cout << "AC";
	}
	else
	{
		cout << "WA";
	}
	return 0;
}

1.脑洞学生会

6.12月哈利波特

9.轮回漫画

10.暑假剪辑六花茴香

还没有收录这位用户的文章。