Problem J: GESP 四 202406-编程2

Problem J: GESP 四 202406-编程2

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

Description

Sample Input Copy

5 1
1 2 3 1 2

Sample Output Copy

7