上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页
摘要: 适用于t[]串长度较小的情况,利用位运算一般比KMP算法快两倍以上。 用D来记录前缀的匹配情况,要使用Shift 算法,需要一个辅助表B。B 是一个字典,key 是问题域字符集中的每个字符,value 是一个n 位无符号整数,记录该字符在模式串T 的哪些位置出现。 由于D【j】表示的是T[0..J] 阅读全文
posted @ 2017-08-16 14:47 joeylee97 阅读(500) 评论(0) 推荐(0) 编辑
摘要: The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, eac 阅读全文
posted @ 2017-08-14 09:54 joeylee97 阅读(141) 评论(0) 推荐(0) 编辑
摘要: The binomial coefficient C(m, n) is defined as C(m, n) = m! (m − n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing 阅读全文
posted @ 2017-08-13 21:12 joeylee97 阅读(208) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/176767#overview A - A Spy in the Metro B 最长递增子序列变形 C D E G H I I 树形DP 阅读全文
posted @ 2017-08-13 16:16 joeylee97 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 3657 括号序列 我们用以下规则定义一个合法的括号序列: (1)空序列是合法的 (2)假如S是一个合法的序列,则 (S) 和[S]都是合法的 (3)假如A 和 B 都是合法的,那么AB和BA也是合法的 例如以下是合法的括号序列: (), [], (()), ([]), ()[], ()[()] 以 阅读全文
posted @ 2017-08-12 16:56 joeylee97 阅读(1119) 评论(0) 推荐(0) 编辑
摘要: 3049 舞蹈家怀特先生 时间限制: 1 s 空间限制: 64000 KB 题目等级 : 黄金 Gold 题解 3049 舞蹈家怀特先生 3049 舞蹈家怀特先生 时间限制: 1 s 空间限制: 64000 KB 题目等级 : 黄金 Gold 时间限制: 1 s 空间限制: 64000 KB 题目等 阅读全文
posted @ 2017-08-12 16:21 joeylee97 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 分数规划问题,是指这样一类问题: 要求f(x)/g(x)的最值,其中f(x),g(x)都是线性函数,而其中被研究的最多的是0-1分数规划,即求这样的一个式子的极值 r=(∑(ci*xi))/(∑(di*xi)),其中xi∈{0,1} 我们可以把这个式子变换一下 z=(∑(ci*xi))-r'*(∑( 阅读全文
posted @ 2017-08-12 11:09 joeylee97 阅读(147) 评论(0) 推荐(0) 编辑
摘要: In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrie 阅读全文
posted @ 2017-08-12 10:04 joeylee97 阅读(647) 评论(0) 推荐(0) 编辑
摘要: These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should b 阅读全文
posted @ 2017-08-11 08:59 joeylee97 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 115624 Accepted: 35897 Case Time Limit: 2000MS Description You have N integers, A1, A2, .. 阅读全文
posted @ 2017-08-10 15:32 joeylee97 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页