随笔分类 - dfs
摘要:1128: mxh道歉记 题目链接:https://oj.chimuyuan.cn/problem/show/1128 代码: c++ include using namespace std; char a[50][50]; int b[8][2]={{ 1,1},{0,1},{1,1},{ 1,0
阅读全文
摘要:今天,你惹对象生气了吗 题目链接:https://ac.nowcoder.com/acm/contest/298/B 思路: 先对可以采的花进行覆盖,再用dfs进行搜索。 代码: c++ include using namespace std; char a[100][100]; int n,m
阅读全文
摘要:油田 题目链接:https://vjudge.net/problem/ZOJ 1709 思路: 多组输入直到输入00为止,输出油田的个数;利用dfs进行搜索。 代码: c++ include using namespace std; char a[105][105]; int b[8][2]={
阅读全文

浙公网安备 33010602011771号