#K11141. Verify Harmony
Verify Harmony
Verify Harmony
You are given a permutation of the first N natural numbers and an integer K. Your task is to verify if the first K elements of the permutation form a strictly increasing sequence.
In other words, check whether the following condition holds:
$$ a_1 < a_2 < \cdots < a_K $$If the condition is satisfied, print Good Harmony
; otherwise, print Discord
.
inputFormat
The first line of the input contains two space-separated integers N and K, where N is the number of elements in the permutation and K is the length of the sequence to be checked.
The second line contains N space-separated integers representing the permutation of the first N natural numbers.
outputFormat
Output a single line containing Good Harmony
if the first K numbers are in strictly increasing order, otherwise output Discord
.
5 3
1 2 3 5 4
Good Harmony
</p>