cswork / OA打开练习工作台

SnowflakeOA #5

Vowel Substring — Substrings Made of Vowels with All 5 Present

估计中等可在线判题

考点(AI 标注)双指针滑窗哈希计数

Count all contiguous substrings that contain only aeiou and in which each of the five vowels appears at least once, and output the exact integer.

输入格式

One line containing a string over a..z of length 1..100000.

输出格式

Output the single integer required by the problem.

样例 1

输入:

aeiou

输出:

1

样例 2

输入:

aaeiouu

输出:

4

样例 3

输入:

aeiobuaeiou

输出:

3

样例说明

The answers to the three public examples are, in order: 1; 4; 3. All examples have been verified by independent small-scale enumeration or state search.