|
|
back to boardTest 8 python Posted by bhn 25 May 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 Posted by ivan228 16 Oct 2018 20:34 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) |
|
|