版本比较
[题解]P7284 [COCI2020-2021#4] Patkice II
正文
增加 1 行删除 1 行
54 行未改动55565758596061626330 行未改动54 行未改动//cout<<temp.first<<" "<<temp.second<<endl;for(int i=0;i<4;i++){int tx=temp.first+dx[i],ty=temp.second+dy[i];if(tx<1||tx>n||ty<1||ty>m)continue;int w=(sea[temp.first][temp.second]==dir[i]||sea[temp.first][temp.second]=='o')?0:1;if(dis[tx][ty]>dis[temp.first][temp.second]+w){dis[tx][ty]=dis[temp.first][temp.second]+w;pre[tx][ty]=temp;30 行未改动54 行未改动55565758596061626330 行未改动54 行未改动//cout<<temp.first<<" "<<temp.second<<endl;for(int i=0;i<4;i++){int tx=temp.first+dx[i],ty=temp.second+dy[i];if(tx<1||tx>n||ty<1||ty>m)continue;int w=(sea[temp.first][temp.second]==dir[i]||sea[temp.first][temp.second]=='o')?0:1;if(dis[tx][ty]>dis[temp.first][temp.second]+w){dis[tx][ty]=dis[temp.first][temp.second]+w;pre[tx][ty]=temp;30 行未改动