XorSumProblemDescriptionZeus和Prometheus做了一个游戏,Prometheus给Zeus一个集合,集合中包括了N个正整数,随后Prometheus将向Zeus发起M次询问,每次询问中包括一个正整数S,之后Zeus须要在集合其中找出一个正整数K,使得K与S的异或结果最...
分类:
其他好文 时间:
2014-06-28 10:15:04
阅读次数:
224
DFS+字典树。 1 #include 2 #include 3 #include 4 5 typedef struct Trie { 6 int v; 7 Trie *next[26]; 8 } Trie; 9 10 Trie root; 11 int ...
分类:
其他好文 时间:
2014-06-27 14:32:44
阅读次数:
183
字典树简单题。 1 #include 2 #include 3 #include 4 5 typedef struct Trie { 6 Trie *next[26]; 7 char str[15]; 8 } Trie; 9 10 Trie root;11 12 void c...
分类:
其他好文 时间:
2014-06-27 11:32:27
阅读次数:
172
这题就是一个字典树的模板题统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others) Total Submission(s): 16997 Accepted Submission(s): ...
分类:
其他好文 时间:
2014-06-25 13:39:19
阅读次数:
133
这题看是否这题能A是侥幸,解决的办法是先存一下输入的字符串,进行排序。Problem DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is...
分类:
其他好文 时间:
2014-06-25 11:46:47
阅读次数:
248
#include #include #include #include using namespace std; typedef struct Node { struct Node *next[10]; int flag; }Node,*Tree; int flag1; void Cre...
分类:
其他好文 时间:
2014-06-25 11:27:43
阅读次数:
154
点击打开链接
Xor Sum
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)
Total Submission(s): 291 Accepted Submission(s): 151
Problem Description
Zeus 和...
分类:
其他好文 时间:
2014-06-24 23:43:48
阅读次数:
343
一改时间以后WA了,我就知道这题是考字典树,可惜代码怎么也不会敲了,郁闷。#include #include #include typedef struct Node{ int flag;struct Node *next[26];}Node,*Tree;char a[200010][6];int ...
分类:
其他好文 时间:
2014-06-24 14:31:01
阅读次数:
161