Cody

Problem 43803. Cookie Cutters

  • Created by JD

Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the larger matrix with a given offset. Return that matrix. For example, given

 m =
   [ 17  24   1   8  15
     23   5   7  14  16
      4   6  13  20  22
     10  12  19  21   3
     11  18  25   2   9 ]

and

 n =
   [ 1 1 1
     1 1 1 ]

and o = [2 3], the result would be

    7  14  16
   13  20  22

The overlap of the two matrices will always be valid, so [4 5] would not be a valid offset for this example problem.

Solution Stats

71.43% Correct | 28.57% Incorrect
Last solution submitted on Sep 19, 2019

Problem Comments

Problem Recent Solvers26

Suggested Problems

More from this Author11

Problem Tags