#3277
Lee
Se consideră o matrice cu N
linii și N
coloane, numerotate de la 1
la N
, care memorează doar valori 0
și 1
. Se dau de asemenea coordonatele a trei componente din această matrice. Să se determine lungimea minimă a unui drum care pleacă din poziția (1,1)
, trece obligatoriu prin cele trei componente date (nu contează în ce ordine) și apoi ajunge în poziția (N, N)
, drum care trece doar prin componente marcate cu 0
și învecinate pe linii și coloane.
Problema | Lee | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49785534 | Utilizator | |
Fișier | lee.cpp | Dimensiune | 3.23 KB |
Data încărcării | 14 Martie 2024, 19:21 | Scor / rezultat | Eroare de compilare |
lee.cpp: In member function 'void lee::main1()': lee.cpp:93:20: error: no matching function for call to 'lee::Lee(int [110][110], int)' Lee(mat1, 0); ^ lee.cpp:93:20: note: candidate is: lee.cpp:67:10: note: void lee::Lee(int (*)[101], int) void Lee(int mat[101][101], int k) { ^ lee.cpp:67:10: note: no known conversion for argument 1 from 'int [110][110]' to 'int (*)[101]' lee.cpp:94:20: error: no matching function for call to 'lee::Lee(int [110][110], int)' Lee(mat2, 1); ^ lee.cpp:94:20: note: candidate is: lee.cpp:67:10: note: void lee::Lee(int (*)[101], int) void Lee(int mat[101][101], int k) { ^ lee.cpp:67:10: note: no known conversion for argument 1 from 'int [110][110]' to 'int (*)[101]' lee.cpp:95:20: error: no matching function for call to 'lee::Lee(int [110][110], int)' Lee(mat3, 2); ^ lee.cpp:95:20: note: candidate is: lee.cpp:67:10: note: void lee::Lee(int (*)[101], int) void Lee(int mat[101][101], int k) { ^ lee.cpp:67:10: note: no known conversion for argument 1 from 'int [110][110]' to 'int (*)[101]' lee.cpp:96:20: error: no matching function for call to 'lee::Lee(int [110][110], int)' Lee(mat4, 3); ^ lee.cpp:96:20: note: candidate is: lee.cpp:67:10: note: void lee::Lee(int (*)[101], int) void Lee(int mat[101][101], int k) { ^ lee.cpp:67:10: note: no known conversion for argument 1 from 'int [110][110]' to 'int (*)[101]'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lee face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.