#P9078. [PA 2018] Język polski

[PA 2018] Język polski

Problem Description

This problem is translated from PA 2018 Round 1 Język polski.

Given a string ss, find the number of substrings that satisfy the following condition.

  • In this substring, there exists at least one length 33 substring consisting only of consonant letters or only of vowel letters.

Note that Polish vowels are different from English. In Polish, the vowels are a,e,i,o,u,ya,e,i,o,u,y.

Any letter that is not a vowel is a consonant.

Input Format

One line containing a string ss consisting only of lowercase letters.

Output Format

Output one integer in one line, representing the number of substrings that satisfy the condition.

kostka
6
aaaa
3

Hint

Explanation for Sample 1

All substrings that satisfy the condition are as follows: $\texttt{stk},\texttt{ostk},\texttt{kostk},\texttt{stka},\texttt{ostka},\texttt{kostka}$.


Constraints

This problem uses bundled testdata.

Let the string length be len\mathrm{len}, then len200000\mathrm{len} \le 200000.

Translated by ChatGPT 5