Diberikan array masukan 1D berisi nol (terisi), dengan area yang ditutupi tak terhingga (kosong):

O = (·, ·, ·, 0, 0, 0, 0, 0, ·, 0, 0, 0, ·, ·, ·)

Buatlah urutan yang cocok … 3 2 1 0 1 2 3 … untuk setiap elemen, pusatkan 0 pada setiap indeks:

(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14) + ∞
(1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13) + ∞
(2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12) + ∞
(3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11) + 0
(4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10) + 0
(5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) + 0
(6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8) + 0
(7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7) + 0
(8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6) + ∞
(9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5) + 0
(10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4) + 0
(11,10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3) + 0
(12,11,10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2) + ∞
(13,12,11,10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1) + ∞
(14,13,12,11,10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0) + ∞

Anda kemudian menambahkan nilai dari array ke setiap elemen di baris:

(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11)
(4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10)
(5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
(6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
(7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5)
(10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4)
(11,10,9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)
(∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞, ∞)

Dan kemudian ambil nilai minimum setiap kolom:

P = (3, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 3)

Urutan ini dihitung di dalam area bertopeng, jauh dari angka nol. Ini adalah bidang jarak positif P.

Anda dapat melakukan hal yang sama untuk topeng terbalik:

I = (0, 0, 0, ·, ·, ·, ·, ·, 0, ·, ·, ·, 0, 0, 0)

untuk mendapatkan luas pelengkap yaitu bidang jarak negatif N:

N = (0, 0, 0, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, 0, 0)

Itulah yang dilakukan EDT, kecuali ia menggunakan jarak persegi … 9 4 1 0 1 4 9 …:

Sumber

Krystian Wiśniewski
Krystian Wiśniewski is a dedicated Sports Reporter and Editor with a degree in Sports Journalism from He graduated with a degree in Journalism from the University of Warsaw. Bringing over 14 years of international reporting experience, Krystian has covered major sports events across Europe, Asia, and the United States of America. Known for his dynamic storytelling and in-depth analysis, he is passionate about capturing the excitement of sports for global audiences and currently leads sports coverage and editorial projects at Agen BRILink dan BRI.