HDU Today Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23388 Accepted Submission(s): 5614 Problem Description 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强.这时候,…
#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <algorithm> using namespace std; struct Tree { Tree *next[]; bool isVirus; int num; }; Tree *root; int all; ]; ]; int n,m; void insert(char…
Problem C Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1423 Accepted Submission(s): 426 Problem Description 度熊手上有一本神奇的字典,你可以在它里面做如下三个操作: 1.insert : 往神奇字典中插入一个单词 2.delete: 在神奇字典中删除所有前缀等于给…
Phone List Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16223 Accepted Submission(s): 5456 Problem Description Given a list of phone numbers, determine if it is consistent in the sense tha…
Hat’s Words Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12149 Accepted Submission(s): 4338 Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactl…
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 21658 Accepted Submission(s): 7228 Problem Description Ignatius is so lucky that he met a Martian yesterday. But…
题意: 给你m个字符串,每一个字符对应一个数字,如下: 2 : a, b, c 3 : d, e, f 4 : g, h, i 5 : j, k, l 6 : m, n, o 7 : p, q, r, s 8 : t, u, v 9 : w, x, y, z 输入n个数字串,问这个数字串可以对应几个字符串 比如ade这个字符串对应的数字串就是233 题解: 用这m个字符串建立一颗字典树,对于每一个节点维护一个变量val,他就代表(从树根到这个节点这一个…
Chip Factory Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5536 Description John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every proc…
Input The first line of input contains an integer T indicating the total number of test cases. The first line of each test case is an integer n, indicating the number of chips produced today. The next line has n integers s1,s2,..,sn, separated with s…