You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
100 B

print(sum(int((s:=a.split('-'))[0])<=c.count(b[0])<=int(s[1]) for a,b,c in map(str.split,open(0))))