会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Dillydally
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
9
10
···
18
下一页
2018年8月11日
位运算操作
摘要: 运算方法有六种:& 与运算 | 或运算 ^ 异或运算 ~ 非运算(求补) >> 右移运算 10110) | x >> 1在最后加一个0 | (101101->1011010) | x 1011011) | x 101101) | x | 1把最后一位变成0 | (10...
阅读全文
posted @ 2018-08-11 10:58 MCQ
阅读(150)
评论(0)
推荐(0)
2018年8月10日
HDU 2612(两次BFS+打表)
摘要: 思路:和一般的bfs没有什么区别,主要是把每一个到达'@'的步数分别记录下来,需要注意Y出发不能经过M点,M出发也不能经过Y点。#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long long...
阅读全文
posted @ 2018-08-10 17:18 MCQ
阅读(190)
评论(0)
推荐(0)
HDU 1241(DFS判断连通块个数)
摘要: 水题。#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=200005;const double eps=1e-8;const double PI =...
阅读全文
posted @ 2018-08-10 00:17 MCQ
阅读(260)
评论(0)
推荐(0)
2018年8月9日
POJ3984(bfs+输出路径)
摘要: 思路:题目要求输出每一次走的点,所以我的想法是给每个结点再加个id和fro代表他现在是第几个遍历的和他的根节点是谁,接下来就是常规的bfs了,把答案压到栈里面,最后输出。#include#include#include#include#include#include#...
阅读全文
posted @ 2018-08-09 23:25 MCQ
阅读(142)
评论(0)
推荐(0)
[kuangbin带你飞]专题一 简单搜索(更新中)
摘要: A:dfs水题https://blog.csdn.net/Dilly__dally/article/details/81490710B:三维bfs水题https://blog.csdn.net/Dilly__dally/article/details/81517553...
阅读全文
posted @ 2018-08-09 22:38 MCQ
阅读(125)
评论(0)
推荐(0)
POJ 1426 (BFS)
摘要: 思路:用队列存储“打的表”,即从1开始,1的10倍满足条件,1的10倍+1也满足条件,判断队头是否%n==0就行。#include#include#include#include#include#include#include#include#include#incl...
阅读全文
posted @ 2018-08-09 22:34 MCQ
阅读(135)
评论(0)
推荐(0)
POJ 3278(bfs)
摘要: 虽然是水题,但要注意数组的越界和vis的使用,不然就RE、TLE#include#include#include#include#include#include#include#include#include#include#include#include#inclu...
阅读全文
posted @ 2018-08-09 00:31 MCQ
阅读(146)
评论(0)
推荐(0)
2018年8月8日
POJ2251(三维BFS)
摘要: 水题。 #include#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing name...
阅读全文
posted @ 2018-08-08 23:43 MCQ
阅读(97)
评论(0)
推荐(0)
2018年8月7日
POJ 1321(DFS)
摘要: 水题。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing names...
阅读全文
posted @ 2018-08-07 23:49 MCQ
阅读(131)
评论(0)
推荐(0)
POJ1094(拓扑排序判定有环、不能确定、能确定)
摘要: #include#includeint map[27][27],indegree[27],q[27];int TopoSort(int n) //拓扑排序{ int c=0,temp[27],loc,m,flag=1,i,j; ////flag=1:有序 f...
阅读全文
posted @ 2018-08-07 22:18 MCQ
阅读(138)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
18
下一页
公告