#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 | #64518629 | Utilizator | |
| Fișier | chenar.cpp | Dimensiune | 483 B |
| Data încărcării | 12 Mai 2026, 10:46 | Scor/rezultat | Eroare de compilare |
chenar.cpp:5:1: error: expected ‘,’ or ‘;’ before ‘ofstream’ 5 | ofstream fout("chenar.out") | ^~~~~~~~ chenar.cpp: In function ‘int main()’: chenar.cpp:10:10: error: ‘n’ was not declared in this scope 10 | fin>>n; | ^ chenar.cpp:13:18: error: ‘a’ was not declared in this scope 13 | fin>>a[i][j]; | ^ chenar.cpp:15:9: error: ‘fout’ was not declared in this scope 15 | fout<<a[1][j]<<" "; | ^~~~ chenar.cpp:15:15: error: ‘a’ was not declared in this scope 15 | fout<<a[1][j]<<" "; | ^ chenar.cpp:17:9: error: ‘fout’ was not declared in this scope 17 | fout<<a[i][n]<<" "; | ^~~~ chenar.cpp:17:15: error: ‘a’ was not declared in this scope 17 | fout<<a[i][n]<<" "; | ^ chenar.cpp:19:9: error: ‘fout’ was not declared in this scope 19 | fout<<a[n][j]<<" "; | ^~~~ chenar.cpp:19:15: error: ‘a’ was not declared in this scope 19 | fout<<a[n][j]<<" "; | ^ chenar.cpp:21:9: error: ‘fout’ was not declared in this scope 21 | fout<<a[i][1]<<" "; | ^~~~ chenar.cpp:21:15: error: ‘a’ was not declared in this scope 21 | fout<<a[i][1]<<" "; | ^ chenar.cpp:9:13: warning: unused variable ‘sd1’ [-Wunused-variable] 9 | int i,j,sd1,sd2; | ^~~ chenar.cpp:9:17: warning: unused variable ‘sd2’ [-Wunused-variable] 9 | int i,j,sd1,sd2; | ^~~
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ă.