시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
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 명령이다.

W3sicHJvYmxlbV9pZCI6IjYyOTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJWaW0iLCJkZXNjcmlwdGlvbiI6IjxwPlx1YmJmOFx1YWQ2ZFx1Yzc1OCBcdWMxOGNcdWMxMjRcdWFjMDAgXHVjNWI0XHViMmM4XHVjMmE0XHVkMmI4IFx1YmU0OFx1YzEzY1x1ZDJiOCBcdWI3N2NcdWM3NzRcdWQyYjhcdWIyOTQgXHVjNTRjXHVkMzBjXHViY2IzICYjMzk7ZSYjMzk7XHViOTdjIFx1YzBhY1x1YzZhOVx1ZDU1OFx1YzljMCBcdWM1NGFcdWFjZTAgXHVjMThjXHVjMTI0IFx1YWMxY1x1Yzk4OFx1YmU0NFx1Yjk3YyBcdWM5ZDFcdWQ1NDRcdWQ1ODhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1YzBjMVx1YWRmY1x1Yzc3NFx1YWMwMCBcdWFjMDBcdWM3YTUgXHVjODhiXHVjNTQ0XHVkNTU4XHViMjk0IFx1YzE4Y1x1YzEyNFx1YWMwMFx1YjI5NCBcdWM1YjRcdWIyYzhcdWMyYTRcdWQyYjhcdWM3NzRcdWIyZTQuIFx1YzY5NFx1Yzk5OCBcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVjNTRjXHVkMzBjXHViY2IzIFx1Y2M5OFx1Yzc0YyAxMFx1YWMxY1x1YjljYyBcdWM3NzR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Ugb2YgdGhlIHRlbiBsb3dlcmNhc2UgbGV0dGVycyBmcm9tICZsZHF1bzthJnJkcXVvOyB0byAmbGRxdW87aiZyZHF1bzsuIFRoZSBcdWZiMDFyc3QgYW5kIHRoZSBsYXN0IGxldHRlciBvZiB0aGUgaW5wdXQgYXJlIGJvdGggZGlmZmVyZW50IGZyb20gJmxkcXVvO2UmcmRxdW87LiAoTiAmbGU7IDcwIDAwMCk8XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5UaGUgb25seSBsaW5lIG9mIG91dHB1dCBzaG91bGQgY29udGFpbiBleGFjdGx5IG9uZSBpbnRlZ2VyOiB0aGUgbGVhc3QgbnVtYmVyIG9mIGtleSBwcmVzc2VzIFZpY3RvciBuZWVkcyB0byBkZWxldGUgYWxsIHRoZSAmbGRxdW87ZSZyZHF1bztzLjxcL3A+XHJcbiIsImhpbnQiOiI8cD5BbiBvcHRpbWFsIHNvbHV0aW9uIGZvciB0aGUgZXhhbXBsZSB0ZXN0IGNhc2UgaXM6PFwvcD5cclxuXHJcbjxwPmZkaHhoaHhmZmh4ZmFoeGhoaHhoaGh4ZmRoeGZnaHhmYWhoeDxcL3A+XHJcblxyXG48cD5Zb3UgY2FuIHRlc3QgdGhpcyBieSBzdGFydGluZyB0aGUgVmltIGVkaXRvciB5b3Vyc2VsZiAodHlwZSAmbGRxdW87dmltIGZpbGUudHh0JnJkcXVvOyBhdCB0aGUgY29tbWFuZCBwcm9tcHQgdG8gb3BlbiBmaWxlLnR4dCwgdHlwZSAmbGRxdW87OnEmbHQ7RU5URVImZ3Q7JnJkcXVvOyB0byBxdWl0KS48XC9wPlxyXG4iLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Olympiad > Baltic Olympiad in Informatics > BOI 2013 F번

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