正文
增加 10 行删除 10 行
18 行未改动19202122232425262728293031323334353657 行未改动9495969798991001011021031041051061071081091101111122 行未改动1151161171181191201211221235 行未改动12913013113213313413513613713813937 行未改动17717817918018118218318418526 行未改动18 行未改动### 样例输入数据 1```8 51 1 1 1 10 0 0 0 11 1 1 0 11 0 0 0 11 0 0 1 11 0 0 0 11 1 1 0 11 0 0 0 12 18 4```输出数据 157 行未改动void bfs(){que.push(new Node{sx,sy,0,nullptr});vis[sx][sy] = 0;while (!que.empty()){Node *it = que.front(); que.pop();if (it->x==ex && it->y==ey){print(it);exit(0);}for (int i=0; i<4; i++){int tx = it->x + dis[i][0];int ty = it->y + dis[i][1];2 行未改动que.push(new Node{tx,ty,it->step+1,it});vis[tx][ty] = it->step;}}}}signed main()5 行未改动for (int j=1; j<=m; j++)scanf("%d", &a[i][j]);}scanf("%d %d %d %d", &sx, &sy, &ex, &ey);bfs();printf("no way\n");return 0;}```37 行未改动cin >> s1 >> s2 >> e1 >> e2;a[s1][s2] = 1;track[++cnt] = (Info){s1,s2,0};q.push((Info){s1,s2,0,cnt});while (!q.empty()){int pos = q.front().cur;for (i=1; i<=4; i++)26 行未改动18 行未改动19202122232425262728293031323334353657 行未改动9495969798991001011021031041051061071081091101111122 行未改动1151161171181191201211221235 行未改动12913013113213313413513613713813937 行未改动17717817918018118218318418526 行未改动18 行未改动### 样例输入数据 1```8 51 1 1 1 10 0 0 0 11 1 1 0 11 0 0 0 11 0 0 1 11 0 0 0 11 1 1 0 11 0 0 0 12 18 4```输出数据 157 行未改动void bfs(){que.push(new Node{sx,sy,0,nullptr});vis[sx][sy] = 0;while (!que.empty()){Node *it = que.front(); que.pop();if (it->x==ex && it->y==ey){print(it);exit(0);}for (int i=0; i<4; i++){int tx = it->x + dis[i][0];int ty = it->y + dis[i][1];2 行未改动que.push(new Node{tx,ty,it->step+1,it});vis[tx][ty] = it->step;}}}}signed main()5 行未改动for (int j=1; j<=m; j++)scanf("%d", &a[i][j]);}scanf("%d %d %d %d", &sx, &sy, &ex, &ey);bfs();printf("no way\n");return 0;}```37 行未改动cin >> s1 >> s2 >> e1 >> e2;a[s1][s2] = 1;track[++cnt] = (Info){s1,s2,0};q.push((Info){s1,s2,0,cnt});while (!q.empty()){int pos = q.front().cur;for (i=1; i<=4; i++)26 行未改动