#210
Să se parcurgă în sensul acelor de ceasornic chenarul exterior al unei matrice pătratice.
Variante Bacalaureat 2009
| Problema | Chenar | Operații I/O |
chenar.in/chenar.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64632933 | Utilizator | |
| Fișier | chenar.cpp | Dimensiune | 499 B |
| Data încărcării | 19 Mai 2026, 15:04 | Scor/rezultat | Eroare de compilare |
chenar.cpp:5:1: error: ‘in’ does not name a type; did you mean ‘int’? 5 | in a[101][101],i,j, n; | ^~ | int chenar.cpp: In function ‘int main()’: chenar.cpp:9:9: error: ‘n’ was not declared in this scope 9 | f>> n; | ^ chenar.cpp:10:10: error: ‘i’ was not declared in this scope 10 | for (i = 1; i <= n; i++) | ^ chenar.cpp:11:14: error: ‘j’ was not declared in this scope 11 | for (j = 1; j <= n; j++) | ^ chenar.cpp:12:16: error: ‘a’ was not declared in this scope 12 | f>>a[i][j]; | ^ chenar.cpp:13:10: error: ‘j’ was not declared in this scope 13 | for (j = 1; j <= n; j++) | ^ chenar.cpp:14:14: error: ‘a’ was not declared in this scope 14 | g << a[1][j] << " "; | ^ chenar.cpp:15:10: error: ‘i’ was not declared in this scope 15 | for (i = 2; i <= n; i++) | ^ chenar.cpp:16:14: error: ‘a’ was not declared in this scope 16 | g << a[i][n] << " "; | ^ chenar.cpp:17:10: error: ‘j’ was not declared in this scope 17 | for (j = n - 1; j >= 1; j--) | ^ chenar.cpp:18:13: error: ‘a’ was not declared in this scope 18 | g<< a[n][j] << " "; | ^ chenar.cpp:19:10: error: ‘i’ was not declared in this scope 19 | for (i = n - 1; i >= 2; i--) | ^ chenar.cpp:20:13: error: ‘a’ was not declared in this scope 20 | g<< a[i][1] << " "; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Chenar 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ă.