摘要:
题目链接:https://www.luogu.com.cn/problem/P7074 一、dfs(25分)没有任何优化,时间复杂度约(O(3^(n*m))) 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, m; 4 int a[1 阅读全文
摘要:
题目链接https://www.luogu.com.cn/problem/P3397 题目数据很水,但是差分的模版题 方法一:模拟 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, m; 4 int sx, sy, ex, ey; 5 阅读全文
摘要:
链接:https://www.luogu.com.cn/problem/P1115 方法一:0分代码 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, a[210000]; 4 int ans=-(1<<30); 5 int sum( 阅读全文
摘要:
先把如下代码熟悉,再学习BFS的框架 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxN=100; 4 int que[maxN];//定义数组模拟队列 5 int f, r;//队首队尾信息 6 int n;//输入数 阅读全文
摘要:
http://ybt.ssoier.cn:8088/problem_show.php?pid=1219 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 int t;//表示输入t组数据 5 int n, m;//棋盘大小 阅读全文