Problem2362--Melody

2362: Melody

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description




Sample Input Copy

6 4
1
2
3
4
3
3

Sample Output Copy

2

HINT

Explanation
In the sample input, the song 1, 2, 3, 4, 3, 3 could be made into the nice song 1, 2, 3, 1, 2, 3.
This requires 2 notes (those in the 4th and 5th positions) to be changed, which is the fewest possible.

Source/Category

AIO