版本比较
P1126 机器人搬重物·题解
正文
增加 3 行删除 3 行
256 行未改动全部展开25725825926026126226326426582 行未改动34834935035135235335435535644 行未改动40140240340440540640740840975 行未改动256 行未改动全部展开sign[tmp.x][tmp.y][tmp.direction] = true;q[ ++ tt ] = tmp;}}return -1; // 无解}```82 行未改动if (!Move_check(x, y, steps, direction)) return Node(n + 1, m + 1, 0, -1);return Node(x + steps * Frontx[direction], y + steps * Fronty[direction], direction, dist + 1);}Node () : x(0), y(0), direction(0), dist(0) {}Node (int x, int y, char d) : x(x), y(y), direction(change(d)), dist(0) {}Node (int x, int y, int d, int s) : x(x), y(y), direction(d), dist(s) {}bool operator==(const Node &a) const44 行未改动sign[tmp.x][tmp.y][tmp.direction] = true;q[ ++ tt ] = tmp;}}return -1;}// 快读快写卡常75 行未改动256 行未改动全部展开25725825926026126226326426582 行未改动34834935035135235335435535644 行未改动40140240340440540640740840975 行未改动256 行未改动全部展开sign[tmp.x][tmp.y][tmp.direction] = true;q[ ++ tt ] = tmp;}}return -1; // 无解}```82 行未改动if (!Move_check(x, y, steps, direction)) return Node(n + 1, m + 1, 0, -1);return Node(x + steps * Frontx[direction], y + steps * Fronty[direction], direction, dist + 1);}Node () : x(0), y(0), direction(0), dist(0) {}Node (int x, int y, char d) : x(x), y(y), direction(change(d)), dist(0) {}Node (int x, int y, int d, int s) : x(x), y(y), direction(d), dist(s) {}bool operator==(const Node &a) const44 行未改动sign[tmp.x][tmp.y][tmp.direction] = true;q[ ++ tt ] = tmp;}}return -1;}// 快读快写卡常75 行未改动