上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: #includeusing namespace std;typedef char ElementType;typedef struct TNode *Position;typedef Position BinTree;struct TNode{ ElementT... 阅读全文
posted @ 2018-08-24 10:54 MCQ 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 比赛的时候没看这个题,其实很简单,两次二分即可求出答案。#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=100005;const double e... 阅读全文
posted @ 2018-08-21 22:55 MCQ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 具体学习参考https://blog.csdn.net/creatorx/article/details/71100840模板来自kuangbin大神,HDU2222模板题//======================// HDU 2222// 求目标串中出现了几个... 阅读全文
posted @ 2018-08-20 14:14 MCQ 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 开关灯问题。第一种方法就是去枚举第一行的状态(6*5)* (2^6),很快。第二种方法是高斯消元,第一种的思路类似POJ 3279,下面说说高斯消元的思路:记g[i][j]为原矩阵,x[ i ] [ j ]为i,j位置是否按,1是按,0是不按,也就是要求的答案,a[ ... 阅读全文
posted @ 2018-08-18 15:29 MCQ 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 学习参考https://blog.csdn.net/pengwill97/article/details/77200372 浮点数: #define eps 1e − 9const int MAXN=220;double a[MAXN][MAXN],x[MAXN];/... 阅读全文
posted @ 2018-08-18 14:29 MCQ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 字母换成数字而已,字典树模板。#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=10005;const double eps=1e-8;const ... 阅读全文
posted @ 2018-08-15 22:40 MCQ 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 字典树具体学习参考https://www.cnblogs.com/TheRoadToTheGold/p/6290732.html 查找字符串是否出现 /* trie tree的储存方式:将字母储存在边上,边的节点连接与它相连的字母 trie[rt][x]=tot:... 阅读全文
posted @ 2018-08-15 18:08 MCQ 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 模板题。注意一下输入都用gets(),不然WA#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=200005;const double eps=1e... 阅读全文
posted @ 2018-08-15 18:04 MCQ 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题意:有一壶水和两个杯子,每次只能从壶里往杯子里倒水 杯子中的水量是可见的,壶中的水量是不可见的 但是可以知道壶里的水倒完了没有 开始壶中的水量在 中,要求将水到入杯中 并且最后壶中的水量不超过 1,两个杯子的水量差不超过 1思路:首先明确,由于我不知道壶里到底有多... 阅读全文
posted @ 2018-08-14 23:51 MCQ 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题意:n个点 m条无向边的图,找一个欧拉通路/回路使得这个路径所有结点的异或值最大。思路:首先了解欧拉路欧拉路 。先判断是否有欧拉路径或欧拉回路(入度为奇数的点是2或0),然后画画图可以看出每个点当(度数+1)/2是奇数,则有贡献,否则贡献为0(自己异或自己等于... 阅读全文
posted @ 2018-08-14 22:04 MCQ 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页