随笔分类 - 09.字符串 - (4)字典树Trie
摘要:题目链接:http://poj.org/problem?id=2408 World-renowned Prof. A. N. Agram's current research deals with large anagram groups. He has just found a new appli
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1247 Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly t
阅读全文
摘要:题目链接: http://poj.org/problem?id=1816 http://bailian.openjudge.cn/practice/1816?lang=en_US Time Limit: 2000MS Memory Limit: 65536K Description A word i
阅读全文
摘要:题目链接: http://poj.org/problem?id=2513 http://bailian.openjudge.cn/practice/2513?lang=en_US Time Limit: 5000MS Memory Limit: 128000K Description You are
阅读全文
摘要:题目链接:http://poj.org/problem?id=3630 Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another.
阅读全文
摘要:题目链接:http://bailian.openjudge.cn/practice/1451/ 总时间限制: 1000ms 内存限制: 65536kB 描述 Background A while ago it was quite cumbersome to create a message for
阅读全文
摘要:题目链接:https://cn.vjudge.net/problem/LightOJ-1224 Given a set of DNA samples, where each sample is a string containing characters from {A, C, G, T},
阅读全文
摘要:题目链接: http://poj.org/problem?id=2001 http://bailian.openjudge.cn/practice/2001 总时间限制: 1000ms 内存限制: 65536kB A prefix of a string is a substring startin
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2072 Problem Descriptionlily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。
阅读全文
摘要:题目链接:http://poj.org/problem?id=3764 Time Limit: 2000MS Memory Limit: 65536K Description In an edge-weighted tree, the xor-length of a path p is define
阅读全文
摘要:题目链接:传送门 描述在给定的 个整数 中选出两个进行xor运算,得到的结果最大是多少? 输入格式第一行一个整数 ,第二行 个整数 。 输出格式一个整数表示答案。 样例输入31 2 3 样例输
阅读全文
摘要:题目链接:传送门 描述给定 个字符串 ,接下来进行 次询问,每次询问给定一个字符串 ,求 中有多少个字符串是 的前缀。输入字符串的总长度不超过 ,仅包含小写字母。 输入格式第一行两个整数
阅读全文