#224
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 | #64626406 | Utilizator | |
| Fișier | rotire.cpp | Dimensiune | 456 B |
| Data încărcării | 19 Mai 2026, 11:20 | Scor/rezultat | Eroare de compilare |
rotire.cpp: In function ‘int main()’: rotire.cpp:5:17: error: variable ‘std::ifstream fin’ has initializer but incomplete type 5 | ifstream fin("rotire.in") | ^ rotire.cpp:6:5: error: expected ‘,’ or ‘;’ before ‘ofstream’ 6 | ofstream fout("rotire.out") | ^~~~~~~~ rotire.cpp:8:10: error: ‘n’ was not declared in this scope 8 | fin>>n>>m; | ^ rotire.cpp:8:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 8 | fin>>n>>m; | ^ | tm rotire.cpp:11:29: error: expected ‘)’ before ‘;’ token 11 | for(int j=1;j<=m;j++;) | ~ ^ | ) rotire.cpp:11:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(int j=1;j<=m;j++;) | ^~~ rotire.cpp:11:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(int j=1;j<=m;j++;) | ^ rotire.cpp:11:30: error: expected primary-expression before ‘)’ token rotire.cpp:15:29: error: expected ‘)’ before ‘;’ token 15 | for(int j=m;j>=1;j--;) | ~ ^ | ) rotire.cpp:15:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(int j=m;j>=1;j--;) | ^~~ rotire.cpp:15:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | for(int j=m;j>=1;j--;) | ^ rotire.cpp:15:30: error: expected primary-expression before ‘)’ token rotire.cpp:23:6: error: expected ‘}’ at end of input 23 | } | ^ rotire.cpp:10:5: note: to match this ‘{’ 10 | { | ^ rotire.cpp:23:6: error: expected ‘}’ at end of input 23 | } | ^ rotire.cpp:4:1: note: to match this ‘{’ 4 | { | ^
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ă.