시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1268 295 240 23.833%

문제

현환이는 음악 학원에서 피아노를 배우고 있다. 어느 날 선생님은 현환이에게 조표가 없는 악보를 주었다. 자 이제 어떤 음계가 사용되었는지 알아보려고 한다. 현환이는 피아노를 배운지 얼마 되지 않았기 때문에, 칠 수 있는 음계는 가단조와 다장조밖에 없다.

현대 음악에서 한 옥타브는 12음 {A, A#, B, C, C#, D, D#, E, F, F#, G, G#}으로 이루어진다. 가단조를 구성하는 음의 순서는 (A, B, C, D, E, F, G)이고, 다장조를 구성하는 음의 순서는 (C, D, E, F, G, A, B)이다.

가단조와 다장조를 구성하는 음은 같다. 그럼 차이는 무엇일까?

첫 번째 차이는 중심음의 차이이다. 으뜸음은 음계에서 가장 첫 번째 위치에 있는 음이고, 버금딸림음은 네 번째 위치에 있는 음이다. 마지막으로 딸림음은 다섯 번째 위치에 있는 음이다. 가단조에서 으뜸음, 버금딸림음, 딸림음은 A, D, E이고, 다장조에서는 C, F, G이다. 이 세 음을 중심음이라고 한다.

두 번째 차이는 음정의 차이이다. 가단조에서 세 번째 음(C)은 으뜸음(A)보다 반음 세 개 높고, 다장조에서 세 번째 음(E)은 으뜸음(C)보다 반음 네 개 높다. 이러한 음정의 차이때문에 단조는 슬픔 느낌을, 장조는 기쁜 느낌을 준다.

가단조 또는 다장조의 음악이 주어졌을 때, 어떤 음계인지 알아내는 프로그램을 작성하시오.

각 마디의 첫 음이 각각 몇 번씩 나오는지를 센 다음에, 많이 나오는 중심음이 그 음악의 음계라고 생각하면 된다. (만약 A와 C의 중심음 개수가 같은 경우에는 마지막 마디의 마지막 음 하나로 구분한다)

예를 들어, 유명한 음악인 Frère Jacques의 악보는 다음과 같다.

CD|EC|CD|EC|EF|G|EF|G|GAGF|EC|GAGF|EC|CG|C|CG|C

|는 각 마디를 나누는 마디선이다. 여기서 각 마디의 첫 번째 음을 적어보면 다음과 같다. (C, E, C, E, E, G, E, G, G, E, G, E, C, C, C, C) 여기서 (C, C, G, G, G, G, C, C, C, C)는 다장조의 중심음이고, (E, E, E, E, E, E)는 가단조의 중심음이다. 따라서, 이 음악은 다장조이다.

입력

첫째 줄에 음악이 주어진다. 음악은 {"A", "B", "C", "D", "E", "F", "G", "|"}로 이루어져 있으며, 길이는 5보다 크거나 같고, 100을 넘지 않는다. |가 연속해서 등장하거나, 문자열의 양쪽 끝에 나오는 경우는 없다.

출력

다장조라면 C-major, 가단조라면 A-minor를 출력한다. 항상 둘 중 하나이고, 마디의 마지막음의 개수까지 같은 경우는 없다.

예제 입력 1

CD|EC|CD|EC|EF|G|EF|G|GAGF|EC|GAGF|EC|CG|C|CG|C

예제 출력 1

C-major
W3sicHJvYmxlbV9pZCI6IjUyMTEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjMDBcdWIyZThcdWM4NzBcdWM2NDAgXHViMmU0XHVjN2E1XHVjODcwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWQ2MDRcdWQ2NThcdWM3NzRcdWIyOTQgXHVjNzRjXHVjNTQ1IFx1ZDU1OVx1YzZkMFx1YzVkMFx1YzExYyBcdWQ1M2NcdWM1NDRcdWIxNzhcdWI5N2MgXHViYzMwXHVjNmIwXHVhY2UwIFx1Yzc4OFx1YjJlNC4gXHVjNWI0XHViMjkwIFx1YjBhMCBcdWMxMjBcdWMwZGRcdWIyZDhcdWM3NDAgXHVkNjA0XHVkNjU4XHVjNzc0XHVjNWQwXHVhYzhjIFx1Yzg3MFx1ZDQ1Y1x1YWMwMCBcdWM1YzZcdWIyOTQgXHVjNTQ1XHViY2Y0XHViOTdjIFx1YzhmY1x1YzVjOFx1YjJlNC4gXHVjNzkwIFx1Yzc3NFx1YzgxYyBcdWM1YjRcdWI1YTQgXHVjNzRjXHVhY2M0XHVhYzAwIFx1YzBhY1x1YzZhOVx1YjQxOFx1YzVjOFx1YjI5NFx1YzljMCBcdWM1NGNcdWM1NDRcdWJjZjRcdWI4MjRcdWFj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GFpbiB0aGUgdGV4dCAmbGRxdW87Qy1kdXImcmRxdW87IChmb3IgQy1tYWpvcikgb3IgJmxkcXVvO0EtbW9sJnJkcXVvOyAoZm9yIEEgbWlub3IpLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Croatian Open Competition in Informatics > COCI 2012/2013 > Contest #5 1번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: joonas
  • 잘못된 번역을 찾은 사람: psychobabo