Best method to find number of times a 2D pattern occurs in a matrix ?
pattern is fixed
Atcoder ABC #354 Solution Discussion