zushu=int(input()) while(zushu):     arrLen = int(input())     arr = input().split(" ")     dicts = {}     a = 1      for item in arr:         if item in dicts:             dicts[item]+=1          else:             dicts[item]=1     for key in dicts:           if dicts[key] > arrLen//2 :                 a = 0      if a==1:         print("YES")     else:         print("NO")     zushu-=1
点赞 1

相关推荐

ros275229:社团删了吧,cf因该1200才勉强入门吧,也删了,你可以写算法刷了多少道,都比这个好
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务