"""
https://www.lanqiao.cn/problems/511/learning/?page=1&first_category_id=1&name=%E6%9C%BA%E5%99%A8%E7%BF%BB%E8%AF%91
"""
import os
import sys
from collections import deque
# 请在此输入您的代码
a = deque()
M, N = list(map(int, input().split()))
s = input()
count = 0
for c in s.split():
if c not in a:
count += 1
if len(a) >= M:
a.popleft()
a.append(c)
else:
a.append(c)
print(count)
07-18
07-18
07-18
07-18
07-18
07-18
07-18
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交