Skip to content
On this page

09_MoreDC_35.py

WARNING

โค้ดกาวมากครับ อย่าลอกเลย 😭😭😭

ทำเองเถอะนะครับ จะได้ทำข้อสอบได้ 🥲🥲🥲

py
peeps = int(input())

people = {}

for i in range(peeps):
    tokens = input().split(" ")
    people[tokens[0]] = tokens[1:]

search_term = input().split(" ")

matches = []

for peep in people.keys():
    data = people[peep]

    match = True
    for s in search_term:
        if s not in data:
            match = False
            break

    if match:
        matches.append(peep)

matches.sort()

for match in matches:
    print(match, " ".join(people[match]))

if len(matches) == 0:
    print("Not Found")

People who plagiarize Com Prog HW:

People who do Com Prog HW by themself:

Released under the MIT License