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
Answers: 2
Computers and Technology, 21.06.2019 14:00
What does a sperm cell plus egg cell equal in total?
Answers: 1
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
Computers and Technology, 22.06.2019 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
Egy téglalap alakú rácsháló minden pontjáról ismerjük, hogy ott tenger van-e (0 érték) vagy valamely...
Mathematics, 29.01.2020 18:44
Biology, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44
History, 29.01.2020 18:44
Mathematics, 29.01.2020 18:44