QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#770881#7951. Magic CardsvwxyzWA 11ms10712kbPython3358b2024-11-22 01:09:142024-11-22 01:09:16

Judging History

你现在查看的是最新测评结果

  • [2024-11-22 01:09:16]
  • 评测
  • 测评结果:WA
  • 用时:11ms
  • 内存:10712kb
  • [2024-11-22 01:09:14]
  • 提交

answer

N,K,M,F=map(int,input().split())
A=[set(map(int,input().split())) for k in range(K)]
dct={}
for n in range(1,N+1):
    S=""
    for k in range(K):
        if n in A[k]:
            S+="Y"
        else:
            S+="N"
    dct[S]=n
for f in range(F):
    S=input()
    if S in dct:
        ans=dct[S]
    else:
        ans=0
    print(ans)

詳細信息

Test #1:

score: 100
Accepted
time: 8ms
memory: 10712kb

input:

12 4 6 3
1 9 7 11 3 5
2 10 3 6 7 11
4 5 6 7 6 12
8 11 10 9 12 9
YYNY
NNNY
YNNN

output:

11
8
1

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 10ms
memory: 10636kb

input:

13 4 6 4
1 9 7 11 3 5
2 10 3 6 7 11
4 5 6 7 6 12
8 11 10 9 12 9
YYNY
NNNY
YNNN
NNNN

output:

11
8
1
13

result:

ok 4 lines

Test #3:

score: -100
Wrong Answer
time: 11ms
memory: 10612kb

input:

14 4 6 4
1 9 7 11 3 5
2 10 3 6 7 11
4 5 6 7 6 12
8 11 10 9 12 9
YYNY
NNNY
YNNN
NNNN

output:

11
8
1
14

result:

wrong answer 4th lines differ - expected: '0', found: '14'