{"title":"POJ 2217: Secretary","width":"100%","blog_url":"https://mayokoex.hatenablog.com/","version":"1.0","provider_url":"https://hatena.blog","image_url":null,"provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/mayokoex/","url":"https://mayokoex.hatenablog.com/entry/2016/04/04/212507","description":"\u87fb\u672c\u30c4\u30a2\u30fc\u3067\u3059\u3002\u3053\u308c KMP(table \u3092\u4f5c\u308b\u90e8\u5206) \u3067\u89e3\u3051\u305d\u3046\u3067\u3059\u304c\u305b\u3063\u304b\u304f\u306a\u306e\u3067 suffix array \u3067\u89e3\u304d\u307e\u3057\u305f\u3002 \u554f\u984c 2217 -- Secretary \u89e3\u6cd5 S += T \u3068\u3084\u3063\u3066\uff12\u3064\u306e\u6587\u5b57\u3092\u5408\u4f53\u3055\u305b\u305f\u5f8c, lcp \u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002\u3067, S \u306e\u524d\u534a\u5074\u3068 S \u306e\u5f8c\u534a\u5074\u3067\u4e00\u81f4\u3059\u308b\u6587\u5b57\u6570\u3092 lcp \u3067\u8abf\u3079\u307e\u3059\u3002 const int MAXN = 20010; namespace SA { int rank[MAXN], tmp[MAXN]; int n, k; bool compare_sa(int i, int j) { if (rank[i] != rank[j]) re\u2026","height":"190","type":"rich","blog_title":"mayoko\u2019s diary","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F04%2F04%2F212507\" title=\"POJ 2217: Secretary - mayoko\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"mayokoex","categories":["POJ"],"published":"2016-04-04 21:25:07"}