您的当前位置:首 页 >> 信息中心

从头到尾彻底理解KMP,打ACM的岁月

发布日期:2021-10-27 15:46:14 作者: 点击:
Codeforces Round #419 A+B摘要:A. Karen and Morning time limit per test 2 seconds memory limit per test 512 megabytes A. Karen and Morning time limit per test 2 seconds time limit p阅读全文posted @ 2017-06-18 10:09 gaoyanliang阅读(230) 评论(0) 推荐(0) 编辑Codeforces Round #417 C. Sagheer and Nubian Market摘要:C. Sagheer and Nubian Market time limit per test 2 seconds memory limit per test 256 megabytes C. Sagheer and Nubian Market time limit per test 2 seco阅读全文posted @ 2017-06-12 21:57 gaoyanliang阅读(273) 评论(0) 推荐(0) 编辑Codeforces Round #417 B. Sagheer, the Hausmeister摘要:B. Sagheer, the Hausmeister time limit per test 1 second memory limit per test 256 megabytes B. Sagheer, the Hausmeister time limit per test 1 second 阅读全文posted @ 2017-06-12 19:08 gaoyanliang阅读(310) 评论(0) 推荐(0) 编辑RMQ算法详解摘要:RMQ算法,是一个快速求区间最值的离线算法,预处理时间复杂度O(n*log(n)),查询O(1),所以是一个很快速的算法。 当然这个问题用线段树同样能够解决,算法复杂度为:O(N)~O(logN) 。 RMQ: RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这阅读全文posted @ 2017-06-06 09:21 gaoyanliang阅读(5033) 评论(1) 推荐(3) 编辑Manachar算法详解摘要:求解最长回文串之Manachar算法 问题类型: 输入一个字符串,求出其中最大的回文子串。子串的含义是:在原串中连续出现的字符串片段。 回文的含义是:正着看和倒着看相同,如abba和yyxyy。 这类问题对于一些小数据可以暴力枚举回文的中心点求解(处理好奇数和偶数长度的回文即可) 但是时间复杂度较高阅读全文posted @ 2017-06-03 19:10 gaoyanliang阅读(1438) 评论(0) 推荐(1) 编辑hdu 4513 吉哥系列故事——完美队形II (manachar算法)摘要:吉哥系列故事——完美队形II Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,阅读全文posted @ 2017-06-03 18:40 gaoyanliang阅读(246) 评论(0) 推荐(0) 编辑hdu 3613 Best Reward (manachar算法)摘要:Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description After an uphill battle, General Li wo阅读全文posted @ 2017-06-03 18:25 gaoyanliang阅读(368) 评论(0) 推荐(0) 编辑Codeforces(Round #93)126 B. Password摘要:B. Password time limit per test 2 seconds memory limit per test 256 megabytes B. Password time limit per test 2 seconds time limit per test 2 seconds 阅读全文posted @ 2017-05-31 18:35 gaoyanliang阅读(348) 评论(0) 推荐(0) 编辑hiho 1015 KMP算法&& CF 625 B. War of the Corporations摘要:#1015 : KMP算法 #1015 : KMP算法 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。 这一天,他们遇到了一只河蟹,于是河蟹就向小H阅读全文posted @ 2017-05-30 21:49 gaoyanliang阅读(376) 评论(0) 推荐(0) 编辑hdu 1867 A + B for you again摘要:A + B for you again Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Generally speaking, there are阅读全文posted @ 2017-05-30 17:33 gaoyanliang阅读(204) 评论(0) 推荐(0) 编辑hdu 3746 Cyclic Nacklace摘要:Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description CC always becomes very depressed 阅读全文posted @ 2017-05-30 17:16 gaoyanliang阅读(152) 评论(0) 推荐(0) 编辑hdu 3336Count the string摘要:Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description It is well known that AekdyCoin 阅读全文posted @ 2017-05-30 16:14 gaoyanliang阅读(191) 评论(0) 推荐(0) 编辑hdu 1358 Period摘要:Period Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description For each prefix of a given string S with N阅读全文posted @ 2017-05-30 16:00 gaoyanliang阅读(195) 评论(0) 推荐(0) 编辑hiho一下 第一周 最长回文子串摘要:时间限制:1000ms 单点时限:1000ms 内存限制:64MB 时间限制:1000ms 单点时限:1000ms 内存限制:64MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。 这一天,他们遇到了一连串的字符串,阅读全文posted @ 2017-05-29 16:41 gaoyanliang阅读(194) 评论(0) 推荐(0) 编辑KMP算法详解摘要:从头到尾彻底理解KMP 从头到尾彻底理解KMP 1. 引言 本KMP原文最初写于2年多前的2011年12月,因当时初次接触KMP,思路混乱导致写也写得混乱。所以一直想找机会重新写下KMP,但苦于一直以来对KMP的理解始终不够,故才迟迟没有修改本文。 然近期因开了个算法班,班上专门讲解数据结构、面试、阅读全文posted @ 2017-05-29 16:19 gaoyanliang阅读(684) 评论(1) 推荐(0) 编辑Codeforces Round #415 (Div. 2) C. Do you want a date?摘要:C. Do you want a date? 2 seconds 256 megabytes C. Do you want a date? 2 seconds 256 megabytes Leha decided to move to a quiet town Vičkopolis, because阅读全文posted @ 2017-05-28 00:36 gaoyanliang阅读(382) 评论(0) 推荐(1) 编辑Codeforces Round #416 (Div. 2) A+B摘要:A. Vladik and Courtesy 2 seconds 256 megabytes A. Vladik and Courtesy 2 seconds 256 megabytes At regular competition Vladik and Valera won a and b can阅读全文posted @ 2017-05-27 23:51 gaoyanliang阅读(176) 评论(0) 推荐(0) 编辑Codeforces Round #411 (Div. 2) D. Minimum number of steps摘要:D. Minimum number of steps time limit per test 1 second memory limit per test 256 megabytes D. Minimum number of steps time limit per test 1 second ti阅读全文posted @ 2017-05-25 16:20 gaoyanliang阅读(412) 评论(0) 推荐(1) 编辑Codeforces Round #411 (Div. 2) C. Find Amir摘要:C. Find Amir time limit per test 1 second memory limit per test 256 megabytes C. Find Amir time limit per test 1 second time limit per test memory lim阅读全文posted @ 2017-05-25 11:31 gaoyanliang阅读(193) 评论(0) 推荐(0) 编辑Codeforces Round #415 (Div. 2) B. Summer sell-off摘要:B. Summer sell-off time limit per test 1 second memory limit per test 256 megabytes B. Summer sell-off time limit per test 1 second time limit per tes阅读全文posted @ 2017-05-24 13:32 gaoyanliang阅读(331) 评论(0) 推荐(0) 编辑