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

相关推荐

重生我想学测开:嵌入式的问题,我准备入行京东外卖了
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务