近世后人
查看原帖
近世后人
535758
_mumu楼主2024/8/25 11:36

如果你WA on #2

4
1 1 4 4
0100
0000
0010
0110

ans: 4

如果你WA on #5

5
2 3 4 5
10111
01000
00000
00000
00110

ans: 2

如果你像我一样没有Cuazyoxi和Happybob聪明 那么你会让Cuazyoxi或Happybob其中一个像你我一样不聪明

贴上随机数据生成器

#include <bits/stdc++.h>
using std::cin;using std::cout;
const int n=10;//修改大小
signed main(){
	freopen("test.in","w",stdout);
	srand(time(0));
	cout<<n<<'\n';
	int a1=rand()%n+1,a2=rand()%n+1,a3=rand()%n+1,a4=rand()%n+1;
	while(a1==a3 && a2==a4) a3=rand()%n+1,a4=rand()%n+1;
	cout<<a1<<" "<<a2<<" "<<a3<<" "<<a4<<'\n';
	for(int i=1;i<=n;++i){
		for(int j=1;j<=n;++j){
			if((a1==i && a2==j)||(a3==i && a4==j)) cout<<'0';
			else if(rand()%500<100) cout<<'1';
			else cout<<'0';
		}
		cout<<'\n';
	}
}
2024/8/25 11:36
加载中...