Very hard task

Revision en4, by Gabi88, 2023-08-30 10:05:31

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en6 English Gabi88 2023-08-30 10:12:33 39
en5 English Gabi88 2023-08-30 10:07:59 30
en4 English Gabi88 2023-08-30 10:05:31 0 (published)
en3 English Gabi88 2023-07-15 10:34:10 8
en2 English Gabi88 2023-07-15 10:33:57 10
en1 English Gabi88 2023-07-15 10:33:28 571 Initial revision (saved to drafts)