码迷,mamicode.com
首页 >  
搜索关键字:acm算法    ( 679个结果
各种最小生成树。 HDU 1863 HDU 1301 POJ 1258
各种树...
分类:其他好文   时间:2015-02-04 21:54:40    阅读次数:305
leetcode.21------------Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题目:合并两个单链表 思路:先比较两个各链表第一个节点,大的那个节点先设为合并的链表第一个节点,...
分类:其他好文   时间:2015-02-04 13:06:08    阅读次数:136
leetcode.17-----------Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit st...
分类:其他好文   时间:2015-02-04 09:32:52    阅读次数:189
leetcode.20-----------Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va...
分类:其他好文   时间:2015-02-04 09:27:00    阅读次数:108
leetcode.15-----------3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c...
分类:其他好文   时间:2015-02-03 09:35:05    阅读次数:134
leetcode.16----------3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact...
分类:其他好文   时间:2015-02-03 09:33:14    阅读次数:96
HDU 1102 最小生成树
最小生成树...
分类:其他好文   时间:2015-02-02 18:13:20    阅读次数:99
HDU 2066 一个人的旅行
gilr 每当我开始想你的时候...
分类:其他好文   时间:2015-02-02 14:13:20    阅读次数:162
利用AC自动机进行关键字的提取和过滤
昨天看了meituan.com的AC算法在美团上单系统的应用一文,深受启发,原来ACM算法在工程中也能有这样赤裸裸的运用~~~ 于是便复习了AC自动机,并把代码用java重新搞了一遍~~ AC自动机整体的结果大概是长这样的,其实就是在trie树上做KMP : AC自动机里面比较难理解的应该是它的失配指针的计算过程。 这个计算过程从本质上讲就是进...
分类:其他好文   时间:2015-02-01 16:08:56    阅读次数:315
hdu-5167 Fibonacci
链接地址:http://acm.hdu.edu.cn/showproblem.php?pid=5167 Fibonacci Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 474    Accepted Submis...
分类:其他好文   时间:2015-02-01 09:38:10    阅读次数:165
679条   上一页 1 ... 42 43 44 45 46 ... 68 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!