题解 | #记票统计#
记票统计
http://www.nowcoder.com/practice/3350d379a5d44054b219de7af6708894
```while True:
try:
n1 = int(input())
arr1 = list(input().split())
n2 = int(input())
arr2 = list(input().split())
arr1.append('Invalid')
tmp = [0]*(n1+1)
dic = dict(zip(arr1, tmp))
for i in arr2:
if i in dic:
dic[i] += 1
else:
dic['Invalid'] += 1
for k, v in dic.items():
print(k, ':', v)
except:
break