Submit | All submissions | Best solutions | Back to list |
MUSIC2 - A Famous Music Composer |
Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The 12 distinct scale notes are:
A | A# = Bb | B | C | C# = Db | D |
D# = Eb | E | F | F# = Gb | G | G# = Ab |
Five of the notes have two alternate names, as is indicated above with equals sign. Thus, there are 17 possible names of scale notes, but only 12 musically distinct notes. When using one of these as the keynote for a musical key, we can further distinguish between major and minor tonalities. This gives 34 possible keys, of which 24 are musically distinct.
In naming his preludes, Mr. B used all the keys except the following 10, which were named instead by their alternate names:
Ab minor | A# major | A# minor | C# major | Db minor |
D# major | D# minor | Gb major | Gb minor | G# major |
Write a program that, given the name of a key, give an alternate name if it has one, or report the key name is unique.
Input
Each test case is described by one line having the format note tonality, where note is one of the 17 names for the scale notes given above, and tonality is either major or minor. All notes names will be uppercase.
Output
For each case output the required answer, following the format of the sample.
Example
Input: Ab minor D# major G minor Output: Case 1: G# minor Case 2: Eb major Case 3: UNIQUE
Added by: | Fudan University Problem Setters |
Date: | 2012-05-25 |
Time limit: | 0.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | ACM/ICPC World Finals 2012 - Dressing Rehearsal Contest, also used in FDU Local Contest 2012 |
hide comments
|
|||||
2012-06-07 19:51:33 Mayank Tuteja
Problem statement is misleading Thanxs @Navneet Suman |
|||||
2012-06-07 17:38:47 jaans
misleading problem statements:: :O caused me 2 wrong answers :D |
|||||
2012-06-05 13:48:31 Out0fbounds
@Nnavneetsinha i think its "Ab minor" Last edit: 2012-06-05 13:52:30 |