시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 128 MB 8 3 3 50.000%

문제

해빈이와 준규는 쿠키를 좋아하는 쌍둥이 형제이다. 두 사람의 친구 진욱이는 해빈이와 준규에게 쿠키를 만들어주는 것을 세상에서 가장 좋아한다. 하지만, 진욱이는 두 사람이 쿠키를 너무 빨리 먹는다면서 불평한다. 오늘은 두 사람에게 쿠키를 천천히 먹는 방법을 게임을 통해 가르치려고 한다.

진욱이가 구운 쿠키의 수는 N개이고, 각각 1번부터 N번까지 번호가 매겨져 있다. 쿠키는 원형으로 배치되어 있고, i번 쿠키는 i-1번과 i+1번 쿠키 사이에 있다. 1번과 N번 쿠키는 서로 이웃이다.

쿠키는 총 26가지 맛이 있다. 진욱이는 각 맛을 알파벳 소문자 'a'부터 'z'까지로 나타낸다. 같은 알파벳을 가지는 맛은 동일하다.

해빈이와 준규는 쿠기를 5분에 하나씩 먹을 수 있다. 진욱이는 숫자 하나를 크게 외치면, 두 사람은 그 쿠키와 이웃한 쿠키를 먹게 된다. 이 게임은 남은 쿠키의 개수가 1개 또는 2개일때까지 계속되며, 게임이 끝난 후 남은 쿠키는 진욱이가 먹는다.

게임은 길이가 (N-1) div 2인 수열로 나타낼 수 있다. 수열의 원소는 진욱이가 외친 숫자이다. 예를 들어, 위의 그림에서 수열은 (4, 8, 6)이 된다. 수열을 이루고 있는 숫자가 다른 경우에 두 게임은 다르다고 한다.

게임을 몇 번 진행한 후에 진욱이는 해빈이와 준규가 게임 도중에 싸운다는 사실을 알아냈다. 이웃한 쿠키가 서로 다른 맛을 가진 경우에는 두 사람이 싸우게 된다.

진욱이는 두 사람을 싸우지 않게 하면서 게임을 진행하려고 한다.

쿠키 N개의 맛이 주어졌을 때, 두 사람을 싸우지 않게 하면서 게임을 진행하는 방법의 수를 구하는 프로그램을 작성하시오. 방법의 수가 매우 클 수 있기 때문에, 10,007로 나눈 나머지를 출력한다.

입력

첫째 줄에 쿠키의 수 N(3 ≤ N ≤ 100)이 주어진다. 둘째 줄에는 쿠키의 맛이 순서대로 주어진다.

출력

해빈이와 준규가 싸우지 않게 하면서 게임을 진행하는 방법의 수를 10007로 나눈 나머지를 출력한다.

예제 입력 1

8
cibaboca

예제 출력 1

4

힌트

가능한 수열은 (4,8,2), (4,8,6), (8,4,2), (8,4,6)이 있다.

W3sicHJvYmxlbV9pZCI6IjMxMDQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNmZTBcdWQwYTQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1ZDU3NFx1YmU0OFx1Yzc3NFx1YzY0MCBcdWM5MDBcdWFkZGNcdWIyOTQgXHVjZmUwXHVkMGE0XHViOTdjIFx1Yzg4Ylx1YzU0NFx1ZDU1OFx1YjI5NCBcdWMzMGRcdWI0NjVcdWM3NzQgXHVkNjE1XHVjODFjXHVjNzc0XHViMmU0LiBcdWI0NTAgXHVjMGFjXHViNzhjXHVjNzU4IFx1Y2U1Y1x1YWQ2YyBcdWM5YzRcdWM2YjFcdWM3NzRcdWIyOTQgXHVkNTc0XHViZTQ4XHVjNzc0XHVjNjQwIFx1YzkwMFx1YWRkY1x1YzVkMFx1YWM4YyBcdWNmZTBcdWQwYTRcdWI5N2MgXHViOWNjXHViNGU0XHVjNWI0XHVjOGZjXHViMjk0IFx1YWM4M1x1Yzc0NCBcdWMxMzhcdWMwYzFcdWM1ZDBcdWMxMWMgXHVhYzAwXHVjN2E1IFx1Yzg4Ylx1YzU0NFx1ZDU1Y1x1YjJlNC4gXHVkNTU4XHVjOWMwXHViOWNjLCBcdWM5YzRcdWM2YjFcdWM3NzRcdWIyOTQgXHViNDUwIFx1YzBhY1x1Yjc4Y1x1Yzc3NCBcdWNmZTBcdWQwYTRcdWI5N2MgXHViMTA4XHViYjM0IFx1YmU2OFx1YjlhYyBcdWJhMzlcdWIyOTRcdWIyZTRcdWJhNzRcdWMxMWMgXHViZDg4XHVkM2M5XHVkNTVjXHViMmU0LiBcdWM2MjRcdWIyOThcd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XG5cclxuPHA+VGhlIHNlY29uZCBsaW5lIGNvbnRhaW5zIGEgc2VxdWVuY2Ugb2YgTiBsb3dlciBjYXNlIGVuZ2xpc2ggbGV0dGVycywgdHlwZXMgb2YgY29va2llcyBpbiBvcmRlciB0aGV5IGFyZSBhcnJhbmdlZCBpbiBhIGNpcmNsZS4mbmJzcDs8XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5PdXRwdXQgYSBzaW5nbGUgaW50ZWdlciwgdGhlIHRvdGFsIG51bWJlciBvZiB3YXlzIHRvIHBsYXkgYSBnYW1lIHRoYXQgd2lsbCBwcmV2ZW50IERhcmtvIGFuZCBNYXJrbyBmcm9tIGZpZ2h0aW5nIG1vZHVsbyAxMDAwNy4mbmJzcDs8XC9wPlxyXG4iLCJoaW50IjoiPHA+VGhpcyBzYW1wbGUgY29ycmVzcG9uZHMgdG8gaWxsdXN0cmF0aW9ucyBvbiB0aGUgcHJldmlvdXMgcGFnZS4gRm91ciB2YWxpZCBzZXF1ZW5jZXMgYXJlICg0LCA4LCAyKSwgKDQsIDgsIDYpLCAoOCwgNCwgMikgaSAoOCwgNCwgNikuJm5ic3A7PFwvcD5cclxuIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Olympiad > Croatian Highschool Competitions in Informatics > 2010 > Final Exam #1 2번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: chan4928