
洛谷搜索
撒旦即可
研究CV的菜狗
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
洛谷试炼场P1378 油滴扩展(搜索Ex)
题目连接https://www.luogu.org/problemnew/show/P1378 解题思路:利用深度优先搜索,暴力枚举即可,反正最多只有两个点,最大也就搜索6!次 #include<bits/stdc++.h> using namespace std; int vis[10],n; double r[10],x[10],y[10],p; double xl,yl,x...原创 2019-05-01 22:22:31 · 204 阅读 · 0 评论 -
洛谷试炼场P1514 引水入城 (搜索Ex)
题目连接:https://www.luogu.org/problemnew/solution/P1514 解题思路:使用了记忆化搜索加线段匹配的方式 #include<bits/stdc++.h> #define N 505 using namespace std; int l[N][N],r[N][N],vis[N][N],h[N][N]; int dirx[]={1,0,0,...原创 2019-05-02 17:40:04 · 157 阅读 · 0 评论 -
洛谷试炼场P1441 砝码称重 (搜索Ex)
题目连接:https://www.luogu.org/problemnew/show/P1441 解题思路:说到底就是枚举各种可能被删除的方案,然后对枚举出来的方案使用动态规划,计数。值得借鉴 #include<bits/stdc++.h> #define N 25 using namespace std; int a[N],vis[N],dp[2001],res; int n,...原创 2019-05-02 19:02:00 · 157 阅读 · 0 评论 -
洛谷试炼场P1120(搜索Ex)
题目:详见https://www.luogu.org/problemnew/show/P1120 解题思路:深搜其实和枚举类似,但是加上剪枝,能让运算时间大大减小 #include<bits/stdc++.h> using namespace std; int cnt,s[100],use[100],ct; bool cmp(int x,int y) { return x>...原创 2019-04-24 11:04:39 · 205 阅读 · 0 评论