#224
Rotire
Se dă o matrice cu m
linii şi n
coloane şi elemente numere naturale. Să se construiască un nou tablou bidimensional cu n
linii şi m
coloane, obţinut din primul prin rotirea acestuia în sens trigonometric cu 90 o.
Variante Bacalaureat 2009
Problema | Rotire | Operații I/O |
rotire.in /rotire.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49121767 | Utilizator | |
Fișier | rotire.cpp | Dimensiune | 550 B |
Data încărcării | 15 Februarie 2024, 20:47 | Scor / rezultat | Eroare de compilare |
rotire.cpp: In function 'int main()': rotire.cpp:7:5: error: 'ifstream' was not declared in this scope ifstream cin("rotire.in"); ^ rotire.cpp:7:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from rotire.cpp:2: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ rotire.cpp:7:14: error: expected ';' before 'cin' ifstream cin("rotire.in"); ^ rotire.cpp:8:5: error: 'ofstream' was not declared in this scope ofstream cout("rotire.out"); ^ rotire.cpp:8:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from rotire.cpp:2: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ rotire.cpp:8:14: error: expected ';' before 'cout' ofstream cout("rotire.out"); ^ rotire.cpp:11:5: error: 'cin' was not declared in this scope cin>>n>>m; ^ rotire.cpp:22:13: error: 'cout' was not declared in this scope cout<<b[i][j]<<' '; ^ rotire.cpp:23:9: error: 'cout' was not declared in this scope cout<<endl; ^ rotire.cpp:23:15: error: 'endl' was not declared in this scope cout<<endl; ^ rotire.cpp:23:15: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from rotire.cpp:2: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Rotire 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ă.