n=int(input())
L=[]
S=["nista","nista","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"]
for i in range(n):
L+=[input()]
b=input()
r=n
for i in range(len(b)):
for j in range(n):
if L[j]!=0 and L[j][i] not in S[int(b[i])]:
r-=1
L[j]=0
break
print(r)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
3520 KB |
Output is correct |
2 |
Correct |
25 ms |
3300 KB |
Output is correct |
3 |
Runtime error |
25 ms |
3300 KB |
Execution failed because the return code was nonzero |
4 |
Runtime error |
28 ms |
4412 KB |
Execution failed because the return code was nonzero |
5 |
Correct |
47 ms |
3376 KB |
Output is correct |
6 |
Runtime error |
26 ms |
3388 KB |
Execution failed because the return code was nonzero |
7 |
Runtime error |
29 ms |
3900 KB |
Execution failed because the return code was nonzero |
8 |
Runtime error |
30 ms |
4536 KB |
Execution failed because the return code was nonzero |
9 |
Runtime error |
26 ms |
3388 KB |
Execution failed because the return code was nonzero |
10 |
Runtime error |
28 ms |
3896 KB |
Execution failed because the return code was nonzero |