#3346
În arhipelagul X
, ajunge un peşte de aur. După drumul obositor parcurs de peşte, el vrea să se relaxeze într-o anumită zonă din acest arhipelag (cu coordonatele x2
, y2
). Totodată, acest peşte este curios să afle câte modalităţi sunt ca să ajungă în acea zonă.
Problema | pestelee | Operații I/O |
![]() pestelee.in /pestelee.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57036741 | Utilizator | |
Fișier | pestelee.cpp | Dimensiune | 2.74 KB |
Data încărcării | 13 Martie 2025, 16:34 | Scor / rezultat | Eroare de compilare |
pestelee.cpp:12:13: error: array bound is not an integer constant before ']' token int grid[MAX][MAX]; // Matricea cu harta ^ pestelee.cpp:12:18: error: array bound is not an integer constant before ']' token int grid[MAX][MAX]; // Matricea cu harta ^ pestelee.cpp:13:13: error: array bound is not an integer constant before ']' token int dist[MAX][MAX]; // Distanțele minime de la punctul de start ^ pestelee.cpp:13:18: error: array bound is not an integer constant before ']' token int dist[MAX][MAX]; // Distanțele minime de la punctul de start ^ pestelee.cpp:14:18: error: array bound is not an integer constant before ']' token int countWays[MAX][MAX]; // Numărul de modalități de a ajunge în fiecare celulă ^ pestelee.cpp:14:23: error: array bound is not an integer constant before ']' token int countWays[MAX][MAX]; // Numărul de modalități de a ajunge în fiecare celulă ^ pestelee.cpp: In function 'int main()': pestelee.cpp:25:20: error: 'grid' was not declared in this scope fin >> grid[i][j]; ^ pestelee.cpp:35:13: error: 'dist' was not declared in this scope dist[i][j] = -1; // Setăm distanțele ca fiind neexplorate ^ pestelee.cpp:36:13: error: 'countWays' was not declared in this scope countWays[i][j] = 0; // Setăm numărul de modalități la 0 ^ pestelee.cpp:41:5: error: 'dist' was not declared in this scope dist[x1][y1] = 0; ^ pestelee.cpp:42:5: error: 'countWays' was not declared in this scope countWays[x1][y1] = 1; ^ pestelee.cpp:56:73: error: 'grid' was not declared in this scope if (ni >= 1 && ni <= m && nj >= 1 && nj <= n && grid[ni][nj] == 0) { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pestelee 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ă.