#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 | #64893839 | Utilizator | |
| Fișier | chenar.cpp | Dimensiune | 932 B |
| Data încărcării | 10 Iunie 2026, 09:54 | Scor/rezultat | Eroare de compilare |
chenar.cpp: In function ‘int main()’: chenar.cpp:7:5: error: ‘ifstream’ was not declared in this scope 7 | ifstream f("prosirx.in"); | ^~~~~~~~ chenar.cpp:2:1: note: ‘std::ifstream’ is defined in header ‘<fstream>’; did you forget to ‘#include <fstream>’? 1 | #include <cstring> +++ |+#include <fstream> 2 | using namespace std; chenar.cpp:8:5: error: ‘ofstream’ was not declared in this scope 8 | ofstream g("prosirx.out"); | ^~~~~~~~ chenar.cpp:8:5: note: ‘std::ofstream’ is defined in header ‘<fstream>’; did you forget to ‘#include <fstream>’? chenar.cpp:9:5: error: ‘f’ was not declared in this scope 9 | f.getline(s,210); | ^ chenar.cpp:16:5: error: ‘g’ was not declared in this scope 16 | g<<nr<<endl; | ^ chenar.cpp:16:12: error: ‘endl’ was not declared in this scope 16 | g<<nr<<endl; | ^~~~ chenar.cpp:2:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? 1 | #include <cstring> +++ |+#include <ostream> 2 | using namespace std; chenar.cpp:37:40: error: ‘swap’ was not declared in this scope 37 | if(strcmp(cuv[i],cuv[j])>0)swap(cuv[i],cuv[j]); | ^~~~
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ă.