版本比较
题解:P8472 [Aya Round 1 G] 咕噜论坛(post)
正文
增加 3 行删除 3 行
143 行未改动全部展开14414514614714814915015115215315415515615715815916046 行未改动143 行未改动全部展开char a[510][510],answer;int p[510][510],g[510][510],b[510][510];//三个前缀和数组bool solp(const int &x,const int &xx,const int &y,const int &yy){return p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]==(yy-y+1)*(xx-x+1);}//是否全 Pbool solb(const int &x,const int &xx,const int &y,const int &yy){if(p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]) return 0;return k>=g[xx][yy]-g[xx][y-1]-g[x-1][yy]+g[x-1][y-1];}//是否全 Bbool solg(const int &x,const int &xx,const int &y,const int &yy){if(p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]) return 0;return k>=b[xx][yy]-b[xx][y-1]-b[x-1][yy]+b[x-1][y-1];}//是否全 Gint main(){cin>>n>>m>>k;for(int i=1;i<=n;i++)for(int j=1;j<=m;j++){46 行未改动143 行未改动全部展开14414514614714814915015115215315415515615715815916046 行未改动143 行未改动全部展开char a[510][510],answer;int p[510][510],g[510][510],b[510][510];//三个前缀和数组bool solp(const int &x,const int &xx,const int &y,const int &yy){return p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]==(yy-y+1)*(xx-x+1);}//是否全 Pbool solb(const int &x,const int &xx,const int &y,const int &yy){if(p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]) return 0;return k>=g[xx][yy]-g[xx][y-1]-g[x-1][yy]+g[x-1][y-1];}//是否全 Bbool solg(const int &x,const int &xx,const int &y,const int &yy){if(p[xx][yy]-p[xx][y-1]-p[x-1][yy]+p[x-1][y-1]) return 0;return k>=b[xx][yy]-b[xx][y-1]-b[x-1][yy]+b[x-1][y-1];}//是否全 Gint main(){cin>>n>>m>>k;for(int i=1;i<=n;i++)for(int j=1;j<=m;j++){46 行未改动