大佬们帮我看看为啥第一题超时了,顺便求第四题思路 n, p, q = map(int, input().split()) listp = list(map(int, input().split())) listq = list(map(int, input().split())) both = [] for i in range(p): if listp[i] in listq: both.append(listp[i]) listq.remove(listp[i]) print(p - len(both),end = ' ') print(len(listq),end = ' ') print(len(both))
点赞 1

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务