提供一个样例生成器~
查看原帖
提供一个样例生成器~
644112
Sinktank楼主2025/7/20 11:28
#include<bits/stdc++.h>
using namespace std;
int n=1e5,m=1e5,V=1e9;
random_device seed;
mt19937 rd(seed());
int ran(int l,int r){
	return rd()%(r-l+1)+l;
}
signed main(){
	cout<<n<<" "<<m<<"\n";
	for(int i=1;i<=n;i++) cout<<ran(1,V)<<" ";
	cout<<"\n";
	for(int i=1,l,r,op;i<=m;i++){
		l=r=0,op=ran(1,2);
		cout<<op<<" ";
		while(l==r) l=ran(1,n),r=ran(1,n);
		if(l>r) swap(l,r);
		cout<<l<<" "<<r<<" ";
		if(op==1) cout<<ran(1,V)<<"\n";
		else cout<<"\n";
	}
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
signed main(){
	while(1){
		system("P4690-gene.exe > t.in");
		system("P4690-std.exe < t.in > std.out");
		system("P4690.exe < t.in > mine.out");
		if(system("fc std.out mine.out")) return 0;
	}
	return 0;
}
2025/7/20 11:28
加载中...