这是我原先的 check() 函数:
bool check(int x,int y,int bc)
{
if(x<bc||x>n||y<bc||y>m) return false;
ull h1,h2,h3;
int x1=n-(x-bc),y1=m-(y-bc);
h1=a[x][y]-a[x-bc][y]*pow2[bc]-a[x][y-bc]*pow1[bc]+a[x-bc][y-bc]*pow2[bc]*pow1[bc];
h2=b[x1][y]-b[x1-bc][y]*pow2[bc]-b[x1][y-bc]*pow1[bc]+b[x1-bc][y-bc]*pow2[bc]*pow1[bc];
h3=c[x][y1]-c[x-bc][y1]*pow2[bc]-c[x][y1-bc]*pow1[bc]+c[x-bc][y1-bc]*pow2[bc]*pow1[bc];
return (h1==h2&&h2==h3);
}
这是我修改过后的 check() 函数:
bool check(int x,int y,int bc)
{
if(x<bc||x>n||y<bc||y>m) return false;
ull h1,h2,h3;
int x1=n-(x-bc),y1=m-(y-bc);
h1=a[x][y]-a[x-bc][y]*pow2[bc]-a[x][y-bc]*pow1[bc]+a[x-bc][y-bc]*pow2[bc]*pow1[bc];
h2=b[x1][y]-b[x1-bc][y]*pow2[bc]-b[x1][y-bc]*pow1[bc]+b[x1-bc][y-bc]*pow2[bc]*pow1[bc];
h3=c[x][y1]-c[x-bc][y1]*pow2[bc]-c[x][y1-bc]*pow1[bc]+c[x-bc][y1-bc]*pow2[bc]*pow1[bc];
if(h1==h2&&h2==h3) return 1;//修改处
return 0;
}
现在情况是 前者只能得60pts,但是修改后能AC
现在有一个问题,为什么 这种修改会影响答案?以后能不能用 return (h1==h2&&h2==h3) 写check?