|
|
вернуться в форумTest 8 python Послано bhn 25 май 2016 14:36 time limit exceed on python3 there a code: a=[] for i in range(int(input())): a.append(input()) b=[] n=0 for j in range(int(input())): if input() in a: n+=1 print(n) please help me Re: Test 8 python There is "Time limit exceeded" with binary search too. Re: Test 8 python i think that on python i wil not can solve this Re: Test 8 python import sys ll = set() for i in range(int(sys.stdin.readline())): ll.add(sys.stdin.readline()) n = 0 for j in range(int(sys.stdin.readline())): if sys.stdin.readline() in ll: n += 1 print(n) |
|
|