#P13307. 域名判断
域名判断
Description
To distinguish between genuine and fake educational websites, you need to write a program to judge website domain names.
In this problem, a website domain name must satisfy the following requirements:
It is a string composed of uppercase and lowercase letters, digits, and
..No two
.are adjacent, and the string does not start or end with a..There is at least one
..
Additionally, in this problem, an educational website domain name must satisfy the following requirements:
It is a valid website domain name.
Let the domain name be in the format , where is a positive integer with , and represents the -th maximal contiguous segment consisting only of letters and digits.
In the above condition, must be equivalent to , and must be equivalent to (in this problem, two strings are equivalent if they are equal when case is ignored for letters).
You are given a string of length , guaranteed to conform to the website domain name format described above.
Let denote the substring of from the first character to the -th character. For all positive integers satisfying , you need to determine whether is an educational website domain name, i.e., whether it satisfies the educational website domain name format. Output all such positive integers in ascending order.
You do not need to verify whether the given domain name actually exists.
Input Format
A single line containing the string , guaranteed to conform to the website domain name format described in the problem.
Output Format
A single line containing all positive integers that satisfy the conditions, listed in ascending order.
h5.zxx.edu.CN
13
FeOI.Round3.5.on.1u0gu.0r9
A.Edu.Cn1.Edu.Cn2
8 16
Hint
Sample Explanation #1
. For , , , , , .
Here, is equivalent to , and is equivalent to , so is an educational website domain name.
Sample Explanation #2
None of the substrings are educational website domain names.
Constraints
This problem uses bundled tests.
For all test data: .
-
Subtask 1 (20 points): .
-
Subtask 2 (40 points): .
-
Subtask 3 (40 points): No additional constraints.
By Deepseek V3.
京公网安备 11011102002149号