|
||||||||||
ChordTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 388 Accepted Submission(s): 205 Problem Description Lvat is studying music. In this week, he has to figure out what chords are. First of all, he needs to learn the two kinds of most basic chords - the major triad chord and the minor triad chord. In music theory, every 12 successive notes form a loop (or formally, an octave). Practically, we denote each note in an octave from low to high as C, C#, D, D#, E, F, F#, G, G#, A, A# and B. The pitch distance between every two adjacent notes is the same,which is called a semitone. Specifically,thepitchdistance between note C in the higher octave and note B in the adjacent lower octave is also one semitone. To conceptualize this, we can mark them on the piano keyboard, one key one note, as the figure shown below. As mentioned, the pitch distance between every two adjacent key is one semitone: Now Lvat can easily make out the two kinds of most basic chords. You can think of a chord simply as a group of different notes. Specifically, the major triad chord and the minor triad chordare both composed of three different notes, and we denote them from low to high as $N_1, N_2$ and $N_3$: $\qquad$$\cdot$ If the pitch distance between $N_1$ and $N_2$ is exactly 4 semitones, and that between $N_2$ and $N_3$ is exactly 3 semitones, we call the group of notes a major triad chord. $\qquad$$\cdot$ If the pitch distance between $N_1$ and $N_2$ is exactly 3 semitones, and that between $N_2$ and $N_3$ is exactly 4 semitones, we call the group of notes a minor triad chord. For example, consider a group of notes of <$N_1$ = C, $N_2$ = E, $N_3$ = G> in the same octave. Note C and note E have a pitch distance of 4, while note E and note G have a pitch distance of 3, so it is a major triad chord. Next consider a group of notes of <A, C, E>, where note A is in the lower octave, and note C and E are in the adjacent higher octave. Note A and note C have a pitch distance of 3, while note C and note E have a pitch distance of 4, so it is a minor triad chord. Now Lvat needs you to help him decide which groups of notes are major triads and which ones are minor triads. Input The first line is a single number T (T ≤ 2000), indicating the number of groups of notes. For the following T lines, each line contains a group of three notes $N_1, N_2$ and $N_3$ (denoted as described before), separated by a single space. It is guaranteed that the three notes are given from low to high, and the pitch distance between $N_1$ and $N_2$ is no more than 11 semitones, so is $N_2$ and $N_3$. Output Output T lines. The i-th line indicates the answer for the i-th group of notes. If the i-th group constitutes a major triad chord, output “Major triad” (without quotation marks), or if it constitutes a minor triad chord, output “Minor triad” (without quotation marks), otherwise output “Dissonance” (without quotation marks). Sample Input
Sample Output
Source | ||||||||||
|