Free Contest 118 - WORD

View as PDF

Submit solution

Points: 0.13 (partial)
Time limit: 1.0s
Memory limit: 256M

Problem types
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

In case the statement didn't load correctly, you can download the statement here: Statement

Lưu ý: các bạn không nhập, xuất dữ liệu bằng file kể cả khi đề bài có yêu cầu. Đọc, ghi dữ liệu được thực hiện ở stdin và stdout.


Comments

Please read the guidelines before commenting.



  • -1
    nguyendailam0719  commented on June 26, 2026, 3:03 a.m.

    CODE THAM KHẢO, ĐỌC XONG THÌ DOWN VOTE:

    n = int(input())
    a = set()
    
    for i in range(n):
        a.add(input())
    
    m = int(input())
    
    for i in range(m):
        b = input()
        if b in a:
            print("YES")
        else:
            print("NO")