n = int(raw_input())
arr = map(int, raw_input().split())
print set(arr).sort()[-2]
arr = map(int, raw_input().split())
print set(arr).sort()[-2]
How to make each term of an array repeat, with the same terms grouped together? i/p: [A,B,C] o/p: [A,A,A,B,B,B,C,C,C] Solution: >...
No comments:
Post a Comment