Practice on Toph
Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.
Some Basic Chords
Where do you start when you want to learn to play guitar? Well learning chords and strumming songs is the first thing you want to work on.
The following ten beginner guitar chords are the most important first chords to learn. After you’ve memorized these guitar chords, you’ll have the all the technical knowledge you need to play thousands of songs.
|
|
|
|
|
|
|
|
|
|
Since, you are a programmer, your task is not to play guitar. Your task is write a program to identify the input chord.
Input
The first line of input contains the integer T (1 ≤ T ≤ 10), the number of test cases. Each case starts with an integer N (5 ≤ N ≤11), the number of strings are needed to form a chord. Next N lines will contain N strings and these will form a chord.
Output
You program should output exactly T lines. Identify the input chord and print it. Each line should be the form of ‘Case X: Chord’ , where ‘X’ is the case number and ‘Chord’ is the name of the chord.
Sample
Input | Output |
---|---|
2 5 x54321 ~~~~~~ 111111 110001 ~~~~~~ 8 x54321 ~~~~~~ 111111 111101 ~~~~~~ 111111 110011 ~~~~~~ | Case 1: A-major Case 2: A-minor |
Note: It is guaranteed that there is no input chord except the chords are mentioned above.
Problem Setter: Abdul Halim Chowdhury
98% Solution Ratio
aaman007Earliest,
muzahid.islamFastest, 0.0s
SIR.24Lightest, 0 B
mdvirusShortest, 602B
Login to submit