Skip to content

Instantly share code, notes, and snippets.

@amulyakashyap09
Created December 31, 2017 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amulyakashyap09/f2c677af0572b615f627fec6f624ab0b to your computer and use it in GitHub Desktop.
Save amulyakashyap09/f2c677af0572b615f627fec6f624ab0b to your computer and use it in GitHub Desktop.
Check Strict Superset | hackerrank
ms = [int(x) for x in input().split()] #main_set (ms)
ms.sort()
n = int(input()) #no of sub/other lists
os=False
for i in range(n):
ss = [int(y) for y in input().split()] #taking other list as input
if len(ss) > 0 and len(ss) <= len(ms):
ss.sort()
os = set(ms).issuperset(set(ss))
print(os)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment