A. 「一本通 2.1 练习 1」Power Strings

    Type: Default 1000ms 512MiB

「一本通 2.1 练习 1」Power Strings

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

Original source: POJ 2406

Given several strings with lengths 106 \le 10^6 , determine the maximum number of identical substrings each string can be formed by concatenating. For example, ababab can be formed by concatenating 33 ab substrings.

Input Format

Input consists of several lines, each containing a string. Specifically, the string may be . (a single period), which indicates the end of input.

Sample 1

abcd
aaaa
ababab
.

1
4
3

Constraints and Hints

String length 106 \le 10^6 .

20251123 D班作业(7)

Not Claimed
Status
Done
Problem
2
Open Since
2025-11-24 0:00
Deadline
2025-12-1 23:59
Extension
24 hour(s)