字典树
xiaoxiede_wo
这个作者很懒,什么都没留下…
展开
-
异或最大值(01字典树)
题目链接:CSU OJ 1216 #include<bits/stdc++.h> using namespace std; const int maxn = 100000 + 5; //集合中的数字个数 typedef long long LL; int ch[32 * maxn][2]; //节点的边信息 LL value[32 * ma...原创 2018-08-16 09:49:14 · 289 阅读 · 0 评论 -
统计难题
题目链接:hdu1251 用c++交a,用g++会memery 超限 #include<cstdio> #include<cmath> #include<cstring> #include<iostream> #include<algorithm> using namespace std; struct node { i...原创 2018-08-16 11:16:18 · 339 阅读 · 0 评论 -
字典树
字典树详解博客 HDU1251 #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<iostream> using namespace std; char s[15]; typedef struct Trie_node { ...原创 2018-09-13 16:23:09 · 98 阅读 · 0 评论 -
Chip Factory(字典树删减)(模板)
题目链接 题意: 给出n(3≤n≤1000)n(3≤n≤1000)个数字,求max(si+sj)⨁skmax(si+sj)⨁sk,而且i,j,ki,j,k互不相等。 建一个字典树直接找,每次先删除a[i],a[j]然后找出剩下的与a[i]+a[j]的最大异或和,然后然把a[i],a[j]插回去 #include <cstdio> #include <cstring>...原创 2018-10-09 20:02:45 · 136 阅读 · 0 评论