![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
洛谷刷题
你愿意和我一起清理内存吗?
这个作者很懒,什么都没留下…
展开
-
洛谷P1596 [USACO10OCT]湖计数Lake Counting(dfs)
思路和上一道一样//// main.cpp// shuati//// Created by 布屿 on 2019/4/5.// Copyright © 2019 布屿. All rights reserved.//#include <iostream>using namespace std;int kx[9]={0, 1, -1, 0, 0, 1, -1,...原创 2019-04-10 21:46:38 · 264 阅读 · 0 评论 -
洛谷 P1451 求细胞数量 爆搜+深搜(dfs)
思路:问题为求有多少个不包含0的极大连通块。 按照顺序枚举每一个点,在枚举到一个点时,如果他值不为0,说明找到了一个细胞。每找到一个细胞,就把细胞计数器s+1,并利用search()函数把这个细胞抹杀掉,也就是把这个细胞内的数字全部改写成0。//// main.cpp// shuati//// Created by 布屿 on 2019/4/9.// Copyright © 2...原创 2019-04-10 00:09:56 · 251 阅读 · 0 评论 -
洛谷P1219 八皇后
参考题解与n皇后问题——关于斜线的编号https://blog.csdn.net/qq_16964363/article/details/79139889//// main.cpp// shuati//// Created by 布屿 on 2019/4/5.// Copyright © 2019 布屿. All rights reserved.//#include<...原创 2019-04-26 15:41:32 · 166 阅读 · 0 评论 -
洛谷P1605 迷宫 dps
//// main.cpp// shuati//// Created by 布屿 on 2019/4/5.// Copyright © 2019 布屿. All rights reserved.///* P1101 单词方阵 思路:主函数内用两个for循环遍历字母方阵。遍历到y,搜索其周围8方向是否满足“yizhong”顺序。若不满足,退出,若满足,就在数组record中...原创 2019-04-17 21:00:52 · 124 阅读 · 0 评论 -
洛谷1141 01迷宫
第一次写:错得很离谱//// main.cpp// shuati//// Created by 布屿 on 2019/4/5.// Copyright © 2019 布屿. All rights reserved.#include<iostream>using namespace std;int map[1001][1001];int record[10...原创 2019-05-08 21:45:29 · 142 阅读 · 0 评论 -
洛谷 1101单词方阵
参考题解//// main.cpp// shuati//// Created by 布屿 on 2019/4/5.// Copyright © 2019 布屿. All rights reserved.#include<iostream>using namespace std;bool map[102][102];int x[9]={0,0,-1,-1,-...原创 2019-05-10 16:08:45 · 169 阅读 · 0 评论