1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<bits/stdc++.h>

using namespace std;
string s;
long long sam,spl,akt,ans;
int main()
{
    ios_base::sync_with_stdio(0);
    cin>>s;
    akt=-1;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='o'||s[i]=='u'||s[i]=='y')
        {
            sam++;
            spl=0;
        }
        else
        {
            spl++;
            sam=0;
        }
        if(sam>=3||spl>=3)akt=i-2;
        ans=ans+(akt+1);
    }
    cout<<ans;
}