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
28
29
30
31
32
33
#include <stdio.h>
#include<iostream>
short tab [200100];
int i,odp,lng,a,pop;
char zn;

int main ()
{
    i=1;

    while (std::cin>>zn)
    {
        if (zn=='a'||zn=='i'||zn=='o'||zn=='e'||zn=='y'||zn=='u')
        {
            tab[i]=1;
        }
        i++;
    }
    lng=i-1;
    odp=0;
    for (i=1;i<=lng-2;i++)
    {
        if (tab[i]==tab[i+1] && tab[i]==tab[i+2])
        {
            pop=a;
            a=i;
            odp+=(pop*(a-pop));
        }
    }
    odp+=(a*(lng-a-1));
    printf("%li",odp);
    return 0;
}