시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 5 2 2 100.000%

문제

미국의 소설가 어니스트 빈센트 라이트는 알파벳 'e'를 사용하지 않고 소설 개즈비를 집필했다.

상근이가 가장 좋아하는 소설가는 어니스트이다. 요즘 상근이는 알파벳 처음 10개만 이용해서 소설을 쓰고 있다. (abcdefghij)

어느날, 상근이가 사용하는 키보드의 'e'키가 망가졌다. 가난한 상근이는 새로운 키보드를 살 돈이 없기 때문에, 지금까지 소설에서 나온 'e'를 모두 삭제하려고 한다. 상근이의 절친한 친구 선영이는 Vim을 이용하면 쉽게 삭제할 수 있다고 알려주었다.

상근이가 알고 있는 Vim 명령어는 "x", "h", "f" 총 세 개이다.

  • "x"는 현재 커서가 가리키고 있는 글자를 삭제하는 명령이다. 삭제를 한 이후에 커서의 위치는 바뀌지 않는다. 따라서, 상근이는 커서가 문서의 마지막 글자를 가리키고 있는 경우에는 이 명령을 사용할 수 없다.
  • "h"는 커서를 왼쪽으로 한 칸 이동시키는 명령이다. 문서의 첫 글자를 가리키고 있는 경우에는 커서의 위치는 바뀌지 않는다.
  • "f"를 누른 다음에는 글자 C도 같이 입력해야 한다. 현재 커서 위치보다 뒤에 있으면서 가장 가까운 C로 커서를 이동한다. 커서 뒤에 C가 없는 경우에는 커서의 위치는 그 자리에 그대로 있는다.

예를 들어, 텍스트와 커서 위치(밑 줄)가 다음과 같은 경우를 생각해보자.

jeffiehadabigidea

  • "x"를 누르면 jeffehadabigidea 가 된다.
  • "h"를 누르면 jeffiehadabigidea 가 된다.
  • "fi"를 누르면 jeffiehadabigidea 가 된다.

문서가 주어졌을 때, 문서에 나타나는 모든 'e'를 삭제하기 위해서 총 키를 몇 번 눌러야하는지 구하는 프로그램을 작성하시오. 'e' 이외의 글자는 삭제하면 안된다. 처음에 커서는 문서의 첫 글자를 가리키고 있다. 'e'키는 망가졌기 때문에, "fe" 명령은 사용할 수 없다.

입력

첫째 줄에 문서의 길이 N이 주어진다. 둘째 줄에는 문서의 내용이 주어진다. 문서는 'a'부터 'f'까지 알파벳 소문자로만 이루어져 있으며, 첫 글자와 마지막 글자는 'e'가 아니다. (N ≤ 70,000)

출력

첫째 줄에 문서의 모든 'e'를 삭제하기 위해 키를 총 몇 번 눌러야하는지 출력한다.

예제 입력 1

35
chefeddiefedjeffeachbigagedegghehad

예제 출력 1

36

힌트

fdhxhhxffhxfahxhhhxhhhxfdhxfghxfahhx 를 누르면 36번 키를 눌러서 'e'를 모두 제거할 수 있다.

문제에서 설명한 명령은 실제 Vim 명령이다.

W3sicHJvYmxlbV9pZCI6IjYyOTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJWaW0iLCJkZXNjcmlwdGlvbiI6IjxwPlx1YmJmOFx1YWQ2ZFx1Yzc1OCBcdWMxOGNcdWMxMjRcdWFjMDAgXHVjNWI0XHViMmM4XHVjMmE0XHVkMmI4IFx1YmU0OFx1YzEzY1x1ZDJiOCBcdWI3N2NcdWM3NzRcdWQyYjhcdWIyOTQgXHVjNTRjXHVkMzBjXHViY2IzICYjMzk7ZSYjMzk7XHViOTdjIFx1YzBhY1x1YzZhOVx1ZDU1OFx1YzljMCBcdWM1NGFcdWFjZTAgXHVjMThjXHVjMTI0IFx1YWMxY1x1Yzk4OFx1YmU0NFx1Yjk3YyBcdWM5ZDFcdWQ1NDRcdWQ1ODhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1YzBjMVx1YWRmY1x1Yzc3NFx1YWMwMCBcdWFjMDBcdWM3YTUgXHVjODhiXHVjNTQ0XHVkNTU4XHViMjk0IFx1YzE4Y1x1YzEyNFx1YWMwMFx1YjI5NCBcdWM1YjRcdWIyYzhcdWMyYTRcdWQyYjhcdWM3NzRcdWIyZTQuIFx1YzY5NFx1Yzk5OCBcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVjNTRjXHVkMzBjXHViY2IzIFx1Y2M5OFx1Yzc0YyAxMFx1YWMxY1x1YjljYyBcdWM3NzRcd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gbG93ZXJjYXNlIGxldHRlcnMgZnJvbSAmbGRxdW87YSZyZHF1bzsgdG8gJmxkcXVvO2omcmRxdW87LiBUaGUgXHVmYjAxcnN0IGFuZCB0aGUgbGFzdCBsZXR0ZXIgb2YgdGhlIGlucHV0IGFyZSBib3RoIGRpZmZlcmVudCBmcm9tICZsZHF1bztlJnJkcXVvOy4gKE4gJmxlOyA3MCAwMDApPFwvcD5cclxuIiwib3V0cHV0IjoiPHA+VGhlIG9ubHkgbGluZSBvZiBvdXRwdXQgc2hvdWxkIGNvbnRhaW4gZXhhY3RseSBvbmUgaW50ZWdlcjogdGhlIGxlYXN0IG51bWJlciBvZiBrZXkgcHJlc3NlcyBWaWN0b3IgbmVlZHMgdG8gZGVsZXRlIGFsbCB0aGUgJmxkcXVvO2UmcmRxdW87cy48XC9wPlxyXG4iLCJoaW50IjoiPHA+QW4gb3B0aW1hbCBzb2x1dGlvbiBmb3IgdGhlIGV4YW1wbGUgdGVzdCBjYXNlIGlzOjxcL3A+XHJcblxyXG48cD5mZGh4aGh4ZmZoeGZhaHhoaGh4aGhoeGZkaHhmZ2h4ZmFoaHg8XC9wPlxyXG5cclxuPHA+WW91IGNhbiB0ZXN0IHRoaXMgYnkgc3RhcnRpbmcgdGhlIFZpbSBlZGl0b3IgeW91cnNlbGYgKHR5cGUgJmxkcXVvO3ZpbSBmaWxlLnR4dCZyZHF1bzsgYXQgdGhlIGNvbW1hbmQgcHJvbXB0IHRvIG9wZW4gZmlsZS50eHQsIHR5cGUgJmxkcXVvOzpxJmx0O0VOVEVSJmd0OyZyZHF1bzsgdG8gcXVpdCkuPFwvcD5cclxuIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Olympiad > Baltic Olympiad in Informatics > BOI 2013 F번

  • 문제를 번역한 사람: baekjoon
  • 데이터를 추가한 사람: koosaga
  • 문제의 오타를 찾은 사람: metadata