Hello! Can you help me with this task (I came up with it myself).
Task: You get an NxN matrix consisting of zeros and ones. You also have an operation where you can turn part of the 3x3 matrix into zeros. Your task is to convert all ones to zeros with as few operations as possible.
The size of N is unknown, but I was aiming for N <= 2000.
Input: You get integer N and matrix of size NxN. It can only have zeros and ones.
Output: Print integer, the minimal number of operations.
Example: 5 00100 11111 00100 00100 00000
Answer: 2