Very hard task

Правка en2, от Gabi88, 2023-07-15 10:33:57

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский Gabi88 2023-08-30 10:12:33 39
en5 Английский Gabi88 2023-08-30 10:07:59 30
en4 Английский Gabi88 2023-08-30 10:05:31 0 (published)
en3 Английский Gabi88 2023-07-15 10:34:10 8
en2 Английский Gabi88 2023-07-15 10:33:57 10
en1 Английский Gabi88 2023-07-15 10:33:28 571 Initial revision (saved to drafts)