Untitled
unknown
python
3 years ago
416 B
9
Indexable
def tasks(n,a,b):
list_pair = []
for i in range(len(a)):
list_pair.append([a[i],b[i]])
count = 0
for i in range(len(a)):
tmp = list_pair[i].copy()
tmp.reverse()
if(tmp[0]==tmp[1] and list_pair.count(tmp)>1):
count +=1
elif(tmp[0]!=tmp[1] and tmp in list_pair):
count += 1
return int(n-count/2)Editor is loading...