{"provider_name":"Hatena Blog","blog_url":"https://qnighy.hatenablog.com/","url":"https://qnighy.hatenablog.com/entry/20100118/1263813769","author_name":"qnighy","type":"rich","title":"KMP\u6cd5+\u30dc\u30a4\u30a2\u30fc\u30e0\u30fc\u30a2=\u6709\u9650\u30aa\u30fc\u30c8\u30de\u30c8\u30f3","version":"1.0","blog_title":"\u7c21\u6f54\u306aQ","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnighy.hatenablog.com%2Fentry%2F20100118%2F1263813769\" title=\"KMP\u6cd5+\u30dc\u30a4\u30a2\u30fc\u30e0\u30fc\u30a2=\u6709\u9650\u30aa\u30fc\u30c8\u30de\u30c8\u30f3 - \u7c21\u6f54\u306aQ\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/qnighy/","height":"190","width":"100%","image_url":null,"published":"2010-01-18 20:22:49","description":"\u3068\u3044\u3046\u6c17\u304c\u3057\u3066\u304d\u305f\u306e\u3067\u3001\u6587\u5b57\u5217\u691c\u7d22\u306e\u6709\u9650\u30aa\u30fc\u30c8\u30de\u30c8\u30f3\u5316\u3092\u3057\u3066\u307f\u305f\u3002\u2026\u666e\u901a\u306b\u3053\u308c\u3067\u3044\u3044\u3058\u3083\u3093\uff01\u6709\u9650\u30aa\u30fc\u30c8\u30de\u30c8\u30f3\u306e\u751f\u6210\u306b\u304b\u304b\u308b\u6642\u9593\u304a\u3088\u3073\u30e1\u30e2\u30ea\u306fn=\u30ad\u30fc\u30b5\u30a4\u30ba,c=\u6587\u5b57\u306e\u7a2e\u985e\u3068\u304a\u3044\u3066O(cn)\u306a\u306e\u3067\u3001\u305d\u3053\u3067\u5c11\u3057\u9045\u308c\u3092\u3068\u308b\u3051\u3069\u3001\u691c\u7d22\u304c\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u9ad8\u901f(\u691c\u7d22\u5bfe\u8c61\u6587\u5b57\u5217\u3092\u4e00\u56de\u3057\u304b\u53c2\u7167\u3057\u306a\u3044)\u306b\u306a\u308b\u3002\u691c\u7d22\u6587\u5b57\u5217\u304c\u5c0f\u3055\u304f\u3066\u3001\u691c\u7d22\u5bfe\u8c61\u6587\u5b57\u5217\u304c\u5927\u304d\u3044\u3068\u304d\u306b\u6709\u52b9\u3060\u3068\u601d\u3046\u3002 #include <cstdio> void simple_search(const char *str, const char *key) { for(int i = 0; str[i]; i++) { int j; for(j = 0;\u2026","categories":["Programming","Algorithm","C++"]}