아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Haiku

면접 대비

시간 제한1초메모리 제한512 MB

요약
각 단어의 음절 수는 연속한 모음 묶음의 개수다. 연속한 단어 구간이 5, 7, 5음절의 세 부분으로 나뉘는 경우의 수를 센다.
난이도

보통10점 중 5점

유형
누적 합, 투 포인터, 배열, 문자열
정답자
아직 제출이 없습니다

문제

Haiku --- is a type of short form poetry originally from Japan. Traditional haiku consist of three phrases that contains 1717 phonetic units. First 55 of them are on the first line, next 77 of them are on the second line, and the last 55 on the last line.

You have found a big text about haiku. However, there were no line breaks in it. You have already broken the text into words and now you want to find all potential haiku in it: segments of consecutive words that can form a haiku.

For simplicity, the following conventions are adopted in this problem. A word is a sequence of lowercase letters of the English alphabet. A phonetic unit is a sequence of consecutive vowels. Vowels are the letters "a", "e", "i", "o" and "u". For example, the word "contest" contains two phonetic units, and the word "beautiful" contains three of them.

The problem is to find the number of segments of consecutive words, which, if two line breaks are added to them after any two words, would form a haiku.

For example, there are two potential haiku in the text "if the real beauties of sunset in a suspended moment call for the thunder forever":

the real beauties of

sunset in a suspended

moment call for the

and

beauties of sunset

in a suspended moment

call for the thunder

입력

The first line of inpit contains integer nn --- the number of words in text that you have found (1≤n≤1051 \le n \le {10}^5). The next nn lines contain words of lowercase letters. The length of each word does not exceed 2020. It is guaranteed that each word contains at least one phonetic unit.

출력

Output the number of potential haiku in this text.

예제1

  1. 예제 1

    입력
    15
    if
    the
    real
    beauties
    of
    sunset
    in
    a
    suspended
    moment
    call
    for
    the
    thunder
    forever
    
    예상 출력
    2