#4557
Se dă o matrice binara cu N linii și M coloane. Celulele cu numarul 0 sunt libere si se pot traversa. Celulele cu numarul 1 sunt ocupate si nu se pot traversa. Pentru K poziții date, se cere să se determine drumul de lungime minimă care pleacă de la poziția (i1, j1) și trece prin toate cele K poziții intermediare (nu contează în ce ordine), ajungând în final în poziția (i2, j2).
PbInfo
| Problema | Lee3 | Operații I/O |
lee3.in/lee3.out
|
|---|---|---|---|
| Limita timp | 2 secunde | Limita memorie |
Total: 128 MB
/
Stivă 8 MB
|
| Id soluție | #64942380 | Utilizator | |
| Fișier | lee3.cpp | Dimensiune | 4.28 KB |
| Data încărcării | 19 Iunie 2026, 08:40 | Scor/rezultat | 100 puncte |
lee3.cpp: In function ‘int main()’: lee3.cpp:14:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | freopen("lee3.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ lee3.cpp:15:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | freopen("lee3.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | Right on the money! | 10 | 10 | ||
| 1 | 0.004 secunde | Right on the money! | 10 | 10 | ||
| 2 | 0.004 secunde | Right on the money! | 10 | 10 | ||
| 3 | 0.025 secunde | Right on the money! | 10 | 10 | ||
| 4 | 0.062 secunde | Right on the money! | 10 | 10 | ||
| 5 | 0.213 secunde | Right on the money! | 10 | 10 | ||
| 6 | 0.379 secunde | Right on the money! | 10 | 10 | ||
| 7 | 0.548 secunde | Right on the money! | 10 | 10 | ||
| 8 | 0.581 secunde | Right on the money! | 10 | 10 | ||
| 9 | 0.56 secunde | Right on the money! | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lee3 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ă.