随笔分类 - 字典树
摘要:Colored SticksTime Limit:5000MSMemory Limit:128000KTotal Submissions:27097Accepted:7175DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints that touch are
阅读全文
摘要:Organize Your Train part IITime Limit:1000MSMemory Limit:65536KTotal Submissions:6478Accepted:1871DescriptionRJ Freight, a Japanese railroad company for freight operations has recently constructed exchange lines at Hazawa, Yokohama. The layout of the lines is shown in Figure 1.Figure 1: Layout of th
阅读全文
摘要:What Are You Talking AboutTime Limit : 10000/5000ms (Java/Other)Memory Limit : 102400/204800K (Java/Other)Total Submission(s) : 13Accepted Submission(s) : 8Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know
阅读全文
摘要:BabelfishTime Limit : 6000/3000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 11 Accepted Submission(s) : 8Problem DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you hav
阅读全文
摘要:统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others) Total Submission(s): 11471 Accepted Submission(s): 4824 Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignat
阅读全文