摘要: 1.做BFS时要记录路径。 2.注意模的性质~~~大佬给我说的 阅读全文
posted @ 2017-05-16 23:43 天之道,利而不害 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1.kmp找到后替换即可 阅读全文
posted @ 2017-05-16 20:55 天之道,利而不害 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1.建一颗字典树,然后依次查找 2.要delete,因为new的关系。 3.可以先把这道题做了:Xor Sum HDU - 4825 阅读全文
posted @ 2017-05-16 20:21 天之道,利而不害 阅读(446) 评论(0) 推荐(0) 编辑
摘要: Problem Description Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the p 阅读全文
posted @ 2017-05-14 22:45 天之道,利而不害 阅读(642) 评论(0) 推荐(0) 编辑
摘要: Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一 阅读全文
posted @ 2017-05-14 13:45 天之道,利而不害 阅读(171) 评论(0) 推荐(0) 编辑
摘要: CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan le 阅读全文
posted @ 2017-05-13 23:29 天之道,利而不害 阅读(295) 评论(0) 推荐(0) 编辑
摘要: For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the pr 阅读全文
posted @ 2017-05-12 21:56 天之道,利而不害 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Given two sequences of numbers : a11 , a22 , ...... , aNN , and b11 , b22 , ...... , bMM (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a 阅读全文
posted @ 2017-05-11 21:19 天之道,利而不害 阅读(202) 评论(0) 推荐(0) 编辑
摘要: The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote fr 阅读全文
posted @ 2017-05-11 21:05 天之道,利而不害 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Farmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are planning to run away and join the circus. Their hoofed feet prevent them from tightrope wa 阅读全文
posted @ 2017-05-10 23:51 天之道,利而不害 阅读(210) 评论(0) 推荐(0) 编辑