上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: 运算方法有六种:& 与运算 | 或运算 ^ 异或运算 ~ 非运算(求补) >> 右移运算 10110) | x >> 1在最后加一个0 | (101101->1011010) | x 1011011) | x 101101) | x | 1把最后一位变成0 | (10... 阅读全文
posted @ 2018-08-11 10:58 MCQ 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 思路:和一般的bfs没有什么区别,主要是把每一个到达'@'的步数分别记录下来,需要注意Y出发不能经过M点,M出发也不能经过Y点。#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long long... 阅读全文
posted @ 2018-08-10 17:18 MCQ 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 水题。#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 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 思路:题目要求输出每一次走的点,所以我的想法是给每个结点再加个id和fro代表他现在是第几个遍历的和他的根节点是谁,接下来就是常规的bfs了,把答案压到栈里面,最后输出。#include#include#include#include#include#include#... 阅读全文
posted @ 2018-08-09 23:25 MCQ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 思路:用队列存储“打的表”,即从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 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 虽然是水题,但要注意数组的越界和vis的使用,不然就RE、TLE#include#include#include#include#include#include#include#include#include#include#include#include#inclu... 阅读全文
posted @ 2018-08-09 00:31 MCQ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 水题。 #include#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing name... 阅读全文
posted @ 2018-08-08 23:43 MCQ 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 水题。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing names... 阅读全文
posted @ 2018-08-07 23:49 MCQ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页