#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 | #64336202 | Utilizator | |
| Fișier | chenar.cpp | Dimensiune | 511 B |
| Data încărcării | 30 Aprilie 2026, 11:30 | Scor/rezultat | Eroare de compilare |
chenar.cpp:5:28: error: expected ‘,’ or ‘;’ before ‘l’ 5 | ofstream cout("chenar.out")l | ^ chenar.cpp: In function ‘int main()’: chenar.cpp:9:10: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 9 | cin>>n; | ^ | yn 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; did you mean ‘jn’? 11 | for (j=1;j<=n;j++) | ^ | jn chenar.cpp:12:14: error: ‘a’ was not declared in this scope 12 | cin>>a[i][j]; | ^ chenar.cpp:14:10: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 14 | for (j=1;j<=n;j++) | ^ | jn chenar.cpp:15:15: error: ‘a’ was not declared in this scope 15 | cout<<a[1][j]<<" "; | ^ chenar.cpp:17:10: error: ‘i’ was not declared in this scope 17 | for (i=2;i<=n;i++) | ^ chenar.cpp:18:15: error: ‘a’ was not declared in this scope 18 | cout<<a[i][n]<<" "; | ^ chenar.cpp:20:10: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 20 | for (j=n-1;j>=1;j--) | ^ | jn chenar.cpp:21:15: error: ‘a’ was not declared in this scope 21 | cout<<a[n][j]<<" "; | ^ chenar.cpp:23:10: error: ‘i’ was not declared in this scope 23 | for (i=n-1;i>=2;i--) | ^ chenar.cpp:24:15: error: ‘a’ was not declared in this scope 24 | cout<<a[i][1]<<" "; | ^ chenar.cpp:8:8: warning: unused variable ‘ok’ [-Wunused-variable] 8 | { bool ok; | ^~
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ă.