数据生成器(可能不正确,但我用这个调出来了),文件名 tes.cpp:
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
#define int long long
int n,m,a,b,c,d;
inline int read(){
int t=0,f=1;
register char c=getchar();
while(c<'0'||c>'9') f=(c=='-')?(-1):(f),c=getchar();
while(c>='0'&&c<='9') t=(t<<3)+(t<<1)+(c^48),c=getchar();
return t*f;
}
signed main(){
srand(time(0));
n=rand()%6+5,m=rand()%6+5;
a=rand()%(n-2)+3,b=rand()%(n-2)+3;
c=rand()%(a-2)+1,d=rand()%(b-2)+1;
cout<<n<<" "<<m<<" "<<a<<" "<<b<<" "<<c<<" "<<d<<"\n";
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
int x=rand()%10+1;
cout<<x<<" ";
}
cout<<"\n";
}
return 0;
}
对拍程序(my.cpp 是自己的,std.cpp 是标程):
#include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
inline int read(){
int t=0,f=1;
register char c=getchar();
while(c<'0'||c>'9') f=(c=='-')?(-1):(f),c=getchar();
while(c>='0'&&c<='9') t=(t<<3)+(t<<1)+(c^48),c=getchar();
return t*f;
}
signed main(){
int T=1000;
while(T--){
system("tes.exe > 1.in");
system("my.exe < 1.in > 1.out");
system("std.exe < 1.in > 1.ans");
if(system("fc 1.out 1.ans")) break;
}
return 0;
}