#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 | #64829533 | Utilizator | |
| Fișier | chenar.cpp | Dimensiune | 562 B |
| Data încărcării | 04 Iunie 2026, 10:45 | Scor/rezultat | Eroare de compilare |
chenar.cpp:9:5: error: ‘fin’ does not name a type 9 | fin >> n; | ^~~ chenar.cpp:10:5: error: expected unqualified-id before ‘for’ 10 | for (int i = 1; i <= n; i++) | ^~~ chenar.cpp:10:21: error: ‘i’ does not name a type 10 | for (int i = 1; i <= n; i++) | ^ chenar.cpp:10:29: error: ‘i’ does not name a type 10 | for (int i = 1; i <= n; i++) | ^ chenar.cpp:11:25: error: ‘j’ does not name a type 11 | for (int j = 1; j <= n; j++) | ^ chenar.cpp:11:33: error: ‘j’ does not name a type 11 | for (int j = 1; j <= n; j++) | ^ chenar.cpp:13:5: error: expected unqualified-id before ‘for’ 13 | for (int j = 1; j <= n; j++) | ^~~ chenar.cpp:13:21: error: ‘j’ does not name a type 13 | for (int j = 1; j <= n; j++) | ^ chenar.cpp:13:29: error: ‘j’ does not name a type 13 | for (int j = 1; j <= n; j++) | ^ chenar.cpp:15:5: error: expected unqualified-id before ‘for’ 15 | for (int i = 2; i <= n; i++) | ^~~ chenar.cpp:15:21: error: ‘i’ does not name a type 15 | for (int i = 2; i <= n; i++) | ^ chenar.cpp:15:29: error: ‘i’ does not name a type 15 | for (int i = 2; i <= n; i++) | ^ chenar.cpp:17:5: error: expected unqualified-id before ‘for’ 17 | for (int j = n - 1; j >= 1; j--) | ^~~ chenar.cpp:17:25: error: ‘j’ does not name a type 17 | for (int j = n - 1; j >= 1; j--) | ^ chenar.cpp:17:33: error: ‘j’ does not name a type 17 | for (int j = n - 1; j >= 1; j--) | ^ chenar.cpp:19:5: error: expected unqualified-id before ‘for’ 19 | for (int i = n - 1; i >= 2; i--) | ^~~ chenar.cpp:19:25: error: ‘i’ does not name a type 19 | for (int i = n - 1; i >= 2; i--) | ^ chenar.cpp:19:33: error: ‘i’ does not name a type 19 | for (int i = n - 1; i >= 2; i--) | ^ chenar.cpp:21:1: error: expected declaration before ‘}’ token 21 | } | ^
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ă.