#P9425. HDU 6761 Minimum Index

    ID: 5763 传统题 1000ms 256MiB 尝试: 3 已通过: 2 难度: 7 上传者: 标签>CF2200字符串最小表示法Z函数贪心字符串哈希Lyndon分解

HDU 6761 Minimum Index

Description

给你一个字符串,求每个前缀的最小后缀对应的起始位置。

总的字符串长度 <= 2e7

Format

Input

Two integers x and y, satisfying 0x,y327670\leq x,y\leq 32767 .

Output

One integer, the sum of x and y.

Samples

1
aab
1238769