本文共 2536 字,大约阅读时间需要 8 分钟。
这道题是BFS题。需要注意题意理解:最少segments而不是最短路径。由于边界可以出去,所以实现的时候需要注意坐标。
例子之间没有输出空行WA了一次。输入错误WA了多次(最后输入是逐个输入字符,而不是输入行)。
/* ID: thestor1 LANG: C++ TASK: poj1101 */#include #include #include #include #include #include #include #include #include #include #include
转载地址:http://ktxli.baihongyu.com/