We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Python
  3. Sets
  4. Check Strict Superset
  5. Discussions

Check Strict Superset

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • mziemianek3
    2 months ago+ 0 comments
    def main():
        A = set(map(int, input().split()))
        
        s = set()
        
        n = int(input())
        for _ in range(n):
            B = set(map(int, input().split()))
            s.update(B)
            
        is_super_set = True
        
        for i in s:
            if i not in A:
                is_super_set = False
        
        print(is_super_set)
    
    if __name__ == "__main__":
        main()
    
    1|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy