萌新第一天学c艹,性感BFS代码求条,70分TLE

P1141 01迷宫

m 次输入中可能会有重复点,记忆化一下,算过直接输出。
by Algophitronrhythm_ @ 2024-04-27 17:26:34


```cpp if (book[x][y] == -1){ bfs(x,y); }else{ ans[i]=ans[book[x][y]]; } ``` `book[]`为记录数组
by Algophitronrhythm_ @ 2024-04-27 17:27:49


@[Algophitronrhythm_](/user/757040) 也能教教我吗?Thx
by nothing_exe_studio @ 2024-04-27 17:32:53


《第一天会bfs》(无恶意
by Snoozing_QwQ @ 2024-04-27 17:32:59


@[Algophitronrhythm_](/user/757040) 感谢大佬
by 2011Andy @ 2024-04-27 17:33:50


@[nothing_exe_studio](/user/1108078) ?啥
by Algophitronrhythm_ @ 2024-04-27 17:33:50


@[Algophitronrhythm_](/user/757040) 在[讨论版](https://www.luogu.com.cn/discuss/813353)
by nothing_exe_studio @ 2024-04-27 17:44:10


|