以下是我的代码
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a[505][505],b[105][105],n,m,k=1,x,y,r,z;
cin>>n>>m;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
a[i][j]=k++;
}
}
for(int i=0;i<m;i++)
{
cin>>x>>y>>r>>z;
for(int j=y-r;j<=y+r;j++)
{
for(int t=x-r;t<=x+r;t++)
{
b[j][t]=a[j][t];
}
}
if(z==0)
{
for(int j=-r;j<=r;j++)
{
for(int t=-r;t<=r;t++)
{
a[y+j][x+t]=b[y-t][x+j];
}
}
}
else
{
for(int j=-r;j<=r;j++)
{
for(int t=-r;t<=r;t++)
{
a[y+j][x+t]=b[y+t][x-j];
}
}
}
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
cout<<a[i][j];
if(j!=n)
{
cout<<' ';
}
}
cout<<endl;
}
return 0;
}
求大佬给个数据,或者指出我的代码哪里错了