2012年8月14日

HDU 4251 The Famous ICPC Team Again(划分树入门题)

摘要: The Famous ICPC Team AgainTime Limit: 30000/15000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 438Accepted Submission(s): 193Problem DescriptionWhen Mr. B, Mr. G and Mr. M were preparing for the 2012 ACM-ICPC World Final Contest, Mr. B had collected a large set of co 阅读全文

posted @ 2012-08-14 23:12 kuangbin 阅读(723) 评论(0) 推荐(0) 编辑

HDU 2665 Kth number(划分树入门题,纯套模板)

摘要: Kth numberTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2026Accepted Submission(s): 672Problem DescriptionGive you a sequence and ask you the kth big number of a inteval.InputThe first line is the number of the test cases. For each test case, th 阅读全文

posted @ 2012-08-14 21:01 kuangbin 阅读(1931) 评论(0) 推荐(0) 编辑

KMP算法

摘要: 假设主串:S: S[1] S[2] S[3] ……S[n]模式串:T: T[1] T[2] T[3]…..T[m]现在我们假设主串第i 个字符与模式串的第j(j<=m)个字符‘失配’后,主串第i 个字符与模式串的第k(k<j)个字符继续比较,此时就有S[i] != T[j]主串: S[1]...S[i-j+1]...S[i-1]S[i]... ||(匹配) || ≠模式串: T[1]... T[j-1] T[j]由此,可以得到关系式如下 T[1]T[2]T[3]...T[j-1] = S[i-j+1]...S[i-1]由于S[i] != T[j],接下来S[i]将与T[k]继续比较 阅读全文

posted @ 2012-08-14 20:33 kuangbin 阅读(10765) 评论(0) 推荐(2) 编辑

HDU 1044 Collect More Jewels(搜索,先bfs再dfs)

摘要: Collect More JewelsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2932Accepted Submission(s): 547Problem DescriptionIt is written in the Book of The Lady: After the Creation, the cruel god Moloch rebelled against the authority of Marduk the Creato 阅读全文

posted @ 2012-08-14 10:01 kuangbin 阅读(1809) 评论(0) 推荐(1) 编辑

导航

JAVASCRIPT: