forked from iamaunique/CODECHEF-PYTHON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkdir.py
33 lines (32 loc) · 787 Bytes
/
mkdir.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def main():
t=(int)(input())
for abc in range(t):
a=raw_input().split(' ')
n=(int)(a[0])
m=(int)(a[1])
b=[]
for i in range(n):
a=raw_input()
a=a.split('/')
s=''
j=1
while j<len(a):
s+=a[j]
if s not in b:
b.append(s)
j+=1
count=0
for i in range(m):
a=raw_input()
a=a.split('/')
s=''
j=1
while j<len(a):
s=s+a[j]
if s not in b:
count+=1
b.append(s)
j+=1
print 'Case #'+str(abc+1)+': '+str(count)
if __name__=='__main__':
main()