![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 13.02.2021 14:00 person76
Egy téglalap alakú rácsháló minden pontjáról ismerjük, hogy ott tenger van-e (0 érték) vagy valamely sziget (1 és K közötti érték, ahol K sziget van). Két pont távolsága az indexeik különbségének
abszolút értékének összege (Manhattan távolság, pl. (3,2) és (5,1) távolsága abs(3-5)+abs(2-1)=3).
Írj programot, amely megadja a két legközelebbi szigetet!
Bemenet
A standard bemenet első sorában a rácsháló sorai és oszlopai száma (1≤N, M≤100), valamint a szigetek száma (2≤K≤100) van. A következő N sor mindegyikében M szám szerepel a
rácsháló pontjai (0≤Ri, j≤K).
Kimenet
A standard kimenet első sorába két legközelebbi sziget sorszámát kell írni! Több megoldás
esetén közülük tetszőleges írható.
Példa
Bemenet Kimenet
6 5 3
0 1 1 0 0
0 1 1 0 0
0 0 0 0 2
0 0 0 0 2
0 0 0 3 0
3 3 3 3 0
2 3
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
You know the right answer?
Egy téglalap alakú rácsháló minden pontjáról ismerjük, hogy ott tenger van-e (0 érték) vagy valamely...
Questions
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 15.12.2020 21:50
![question](/tpl/images/cats/istoriya.png)
History, 15.12.2020 21:50
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 15.12.2020 21:50
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
Business, 15.12.2020 21:50
![question](/tpl/images/cats/mkx.png)
![question](/tpl/images/cats/mkx.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ap.png)
Advanced Placement (AP), 15.12.2020 21:50
![question](/tpl/images/cats/mkx.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/ekonomika.png)
Business, 15.12.2020 21:50
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 15.12.2020 21:50