zero_shubham1

KK_and_crush_py

Jul 1st, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. t = int(input())
  2.  
  3. while(t>0):
  4.     size = int(input('\n'))
  5.     dic = dict()
  6.     tmp = input().split()
  7.     tmp = tmp[:size]
  8.     for i in tmp:
  9.         dic[i] = 1
  10.  
  11.     size = int(input())
  12.     while(size>0):
  13.         tmp = input()
  14.         if tmp in dic:
  15.             print("\nYes")
  16.         else:
  17.             print("\nNo")
  18.         size-=1
  19.     t-=1
Add Comment
Please, Sign In to add comment