You are viewing a single comment's thread. Return to all comments →
n = int(input().strip()) A = list( map(int, input().strip().split(" "))) total = 0 for _ in range( int(input().strip()) ): shoe = list( map(int, input().strip().split(" "))) if ( shoe[0] in A): total += shoe[1] A.remove(shoe[0]) print(total)
Seems like cookies are disabled on this browser, please enable them to open this website
collections.Counter()
You are viewing a single comment's thread. Return to all comments →