/* * Solution Template for Melody * * Australian Informatics Olympiad 2021 * * This file is provided to assist with reading of input and writing of output * for the problem. You may modify this file however you wish, or * you may choose not to use this file at all. */ #include /* N is the number of notes. */ int N; /* K is the largest number which could be a note. */ int K; /* S contains the sequence of notes forming the song. */ int S[100005]; int answer; int main(void) { /* Read the value of N and K. */ scanf("%d%d", &N, &K); /* Read each note in the song. */ for (int i = 0; i < N; i++) { scanf("%d", &S[i]); } /* * TODO: This is where you should compute your solution. Store the smallest * possible number of notes Melody can change so that her song is nice into * the variable answer. */ /* Write the answer. */ printf("%d\n", answer); return 0; }