正文
增加 4 行删除 4 行
19 行未改动20212223242526272856 行未改动85868788899091929315 行未改动10911011111211311411511611783 行未改动201202203204205206207208209109 行未改动全部展开19 行未改动bool vis[N];struct Node{int x, step;};void bfs(){queue<Node> q;q.push({n, 0});56 行未改动bool vis[N];struct Node{int x, step;};void bfs(){queue<Node> q;q.push({a, 0});15 行未改动q.push({tx, f.step + 1});vis[tx] = 1;}}cout << "-1";}int main(){ios::sync_with_stdio(false);83 行未改动}for(int i = (f % 10) - 1; i <= (f % 10) + 1; i++){if(i < 0 || i > 9){continue;}q.push(f * 10 + i);}}}109 行未改动全部展开19 行未改动20212223242526272856 行未改动85868788899091929315 行未改动10911011111211311411511611783 行未改动201202203204205206207208209109 行未改动全部展开19 行未改动bool vis[N];struct Node{int x, step;};void bfs(){queue<Node> q;q.push({n, 0});56 行未改动bool vis[N];struct Node{int x, step;};void bfs(){queue<Node> q;q.push({a, 0});15 行未改动q.push({tx, f.step + 1});vis[tx] = 1;}}cout << "-1";}int main(){ios::sync_with_stdio(false);83 行未改动}for(int i = (f % 10) - 1; i <= (f % 10) + 1; i++){if(i < 0 || i > 9){continue;}q.push(f * 10 + i);}}}109 行未改动全部展开