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
hide comments
Gaurav Srivastava:
2012-10-01 15:02:02
when to terminate output??????????????????????
|
|
007: Name stolen:
2012-08-09 09:33:13
when to terminate the input |
|
Simón Murillo Gómez:
2012-07-31 03:40:52
Easy one! just look at the first table. |
|
sachin tendulkar:
2012-06-30 00:39:43
easy! 2nd table is given in vain
|
|
Shubham Somani:
2012-06-20 08:15:52
:) Last edit: 2012-09-19 16:34:13 |
|
spock:
2012-06-19 12:01:34
very misleading problem statement..else there is nothing in this problem.. |
|
neerajcrespo:
2012-06-19 11:51:17
tutorial problem. |
|
Shubham:
2012-06-14 10:34:41
2nd table has nothing to do with the problem. |
|
anuj kumar jain:
2012-06-11 09:52:35
will only the keys mentioned in the second matrix have the alternate names? |
|
Abhishek Sanghai:
2012-06-08 07:23:31
misleading problem statement |
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 |