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])] or L[j]!=0 and len(L[j])<n:
r-=1
L[j]=0
break
print(r)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
3300 KB |
Output isn't correct |
2 |
Correct |
24 ms |
3300 KB |
Output is correct |
3 |
Incorrect |
24 ms |
3300 KB |
Output isn't correct |
4 |
Runtime error |
27 ms |
3892 KB |
Execution failed because the return code was nonzero |
5 |
Correct |
64 ms |
3380 KB |
Output is correct |
6 |
Runtime error |
26 ms |
3380 KB |
Execution failed because the return code was nonzero |
7 |
Runtime error |
27 ms |
3632 KB |
Execution failed because the return code was nonzero |
8 |
Runtime error |
31 ms |
3892 KB |
Execution failed because the return code was nonzero |
9 |
Runtime error |
25 ms |
3384 KB |
Execution failed because the return code was nonzero |
10 |
Runtime error |
26 ms |
3632 KB |
Execution failed because the return code was nonzero |