시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 128 MB 11 4 4 36.364%

문제

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

진욱이가 구운 쿠키의 수는 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)이 있다.

예제 입력 2

5
aabab

예제 출력 2

5

가능한 수열은 (3, 1), (5, 2), (4, 4), (4, 1), (4, 2)가 있다.

예제 입력 3

11
fffffffffff

예제 출력 3

388
W3sicHJvYmxlbV9pZCI6IjMxMDQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNmZTBcdWQwYTQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1ZDU3NFx1YmU0OFx1Yzc3NFx1YzY0MCBcdWM5MDBcdWFkZGNcdWIyOTQgXHVjZmUwXHVkMGE0XHViOTdjIFx1Yzg4Ylx1YzU0NFx1ZDU1OFx1YjI5NCBcdWMzMGRcdWI0NjVcdWM3NzQgXHVkNjE1XHVjODFjXHVjNzc0XHViMmU0LiBcdWI0NTAgXHVjMGFjXHViNzhjXHVjNzU4IFx1Y2U1Y1x1YWQ2YyBcdWM5YzRcdWM2YjFcdWM3NzRcdWIyOTQgXHVkNTc0XHViZTQ4XHVjNzc0XHVjNjQwIFx1YzkwMFx1YWRkY1x1YzVkMFx1YWM4YyBcdWNmZTBcdWQwYTRcdWI5N2MgXHViOWNjXHViNGU0XHVjNWI0XHVjOGZjXHViMjk0IFx1YWM4M1x1Yzc0NCBcdWMxMzhcdWMwYzFcdWM1ZDBcdWMxMWMgXHVhYzAwXHVjN2E1IFx1Yzg4Ylx1YzU0NFx1ZDU1Y1x1YjJlNC4gXHVkNTU4XHVjOWMwXHViOWNjLCBcdWM5YzRcdWM2YjFcdWM3NzRcdWIyOTQgXHViNDUwIFx1YzBhY1x1Yjc4Y1x1Yzc3NCBcdWNmZTBcdWQwYTRcdWI5N2MgXHViMTA4XHViYjM0IFx1YmU2OFx1YjlhYyB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pdGxlIjoiMCIsInByb2JsZW1fbGFuZ190Y29kZSI6IkVuZ2xpc2giLCJzYW1wbGVfZXhwbGFpbl8xIjoiPHA+VGhpcyBzYW1wbGUgY29ycmVzcG9uZHMgdG8gaWxsdXN0cmF0aW9ucyBvbiB0aGUgcHJldmlvdXMgcGFnZS4gRm91ciB2YWxpZCBzZXF1ZW5jZXMgYXJlICg0LCA4LCAyKSwgKDQsIDgsIDYpLCAoOCwgNCwgMikgYW5kICg4LCA0LCA2KS48XC9wPlxyXG4iLCJzYW1wbGVfZXhwbGFpbl8yIjoiPHA+Rml2ZSB2YWxpZCBzZXF1ZW5jZXMgYXJlICgzLCAxKSwgKDUsIDIpLCAoNCwgNCksICg0LCAxKSBhbmQgKDQsIDIpLjxcL3A+XHJcbiIsInNhbXBsZV9leHBsYWluXzMiOiI8cD5BbGwgY29va2llcyBzaGFyZSB0aGUgc2FtZSB0eXBlLCBzbyBEYXJrbyBhbmQgTWFya28gY2FuJiMzOTt0IGdldCBpbnRvIGZpZ2h0IG5vIG1hdHRlciB3aGF0LiBJbiBlYWNoIHN0ZXAgTWFyYSBjYW4gc2F5IGFueSBpbnRlZ2VyIHJlbWFpbmluZyBvbiB0aGUgdGFibGUsIHNvIHRoZSB0b3RhbCBudW1iZXIgb2YgZ2FtZXMgaXMgZXF1YWwgdG8gMTEmbWlkZG90OzkmbWlkZG90OzcmbWlkZG90OzUmbWlkZG90OzMgPSAxMDM5NS4gMzg4IGlzIHRoZSByZW1haW5kZXIgb2YgZGl2aXNpb24gYnkgMTAwMDcuPFwvcD5cclxuIn1d

출처

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

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