KMP入门例题(POJ3461,HDU1711)

KMP算法比较难理解,这里推荐一个视频:哔哩哔哩~阿三大神

这里推荐先去多看些别的视频以及资料啥的,注意区分一下,最长前缀后缀数组和next数组的区别(其实差不了多少,next数组是为了方便操作下标,最长前缀后缀数组全体右移1位,然后第一位赋值为-1,就是常用的next数组,全体再加1就是原始的next数组,当然你直接把最长前缀后缀数组当成next数组也行,这里分享的代码就是这样);

例题1:POJ3461

Oulipo

Time Limit: 1000MS   Memory Limit: 65536K
Total Submissions: 49336   Accepted: 19597

Description

The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:

Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair normal, d’abord, puis surgissait l’inhumain, l’affolant. Il aurait voulu savoir où s’articulait l’association qui l’unissait au roman : stir son tapis, assaillant à tout instant son imagination, l’intuition d’un tabou, la vision d’un mal obscur, d’un quoi vacant, d’un non-dit : la vision, l’avision d’un oubli commandant tout, où s’abolissait la raison : tout avait l’air normal mais…

Perec would probably have scored high (or rather, low) in the following contest. People are

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值