2018年8月3日

17-比赛2 F - Fox And Two Dots (dfs)

摘要: Fox And Two Dots CodeForces - 510B 题意:是能否找到一连串同样的字母至少四个形成循环(贯通) 通过dfs 按照相同的字母遍历一遍, 且阻止其走回头路,那么深搜之后再次搜到被标记的点,则肯定就形成了循环。 详情解释,见代码。 代码: 1 #include<bits/s 阅读全文

posted @ 2018-08-03 20:31 短发控丶 阅读(136) 评论(0) 推荐(0) 编辑

17-比赛2 C - Maze (dfs)

摘要: Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only 阅读全文

posted @ 2018-08-03 19:22 短发控丶 阅读(181) 评论(0) 推荐(0) 编辑

导航