摘要: 如果是jdk原因1、电脑环境变量配置如下:我的电脑(右键)→ 属性→ 高级→ 环境变量→ (系统变量)新建→变量名:JAVA_HOME变量值(java安装的目录):C:\ProgramFiles\Java\jdk1.6.0_03在classpath添加:;.;%JAVA_HOME%\lib;%JAV... 阅读全文
posted @ 2014-10-15 20:17 雪溯 阅读(4378) 评论(1) 推荐(1) 编辑
摘要: 首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有模式树(字典树)Trie和KMP模式匹配... 阅读全文
posted @ 2014-10-15 19:55 雪溯 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 134. Centroidtime limit per test: 0.25 sec.memory limit per test: 4096 KBYou are given an undirected connected graph, withNvertices andN-1edges (a tre... 阅读全文
posted @ 2014-10-15 16:20 雪溯 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 132. Another Chocolate Maniactime limit per test: 0.25 sec.memory limit per test: 4096 KBBob reallyLOVESchocolate. He thinks he never gets enough. Ima... 阅读全文
posted @ 2014-10-15 14:47 雪溯 阅读(286) 评论(0) 推荐(0) 编辑