The input consists of several test cases. The first line of each case contains two integers N and R (1
For each test case, output a line containing the minimum total coloring cost required for Bob to color all the nodes.
5 1 1 2 1 2 4 1 2 1 3 2 4 3 5 0 0
33