#672
Se dă un arbore binar care conține valori numere naturale. Să se afișeze valorile din arbore în urma parcurgerii în postordine.
Notă: pentru reprezentarea arborelui se recomandă alocarea statică, folosind tablouri.
| Problema | Postordine | Operații I/O |
postordine.in/postordine.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64337800 | Utilizator | |
| Fișier | postordine.cpp | Dimensiune | 642 B |
| Data încărcării | 30 Aprilie 2026, 12:30 | Scor/rezultat | Eroare de compilare |
postordine.cpp:3:1: error: ‘ifstream’ does not name a type 3 | ifstream fin("postordine.in"); | ^~~~~~~~ postordine.cpp:4:1: error: ‘ofstream’ does not name a type 4 | ofstream fout("postordine.out"); | ^~~~~~~~ postordine.cpp: In function ‘void RSD(int)’: postordine.cpp:14:9: error: ‘fout’ was not declared in this scope 14 | fout<<a[x]<<" "; | ^~~~ postordine.cpp: In function ‘int main()’: postordine.cpp:19:5: error: ‘fin’ was not declared in this scope 19 | fin>>n; | ^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Postordine 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ă.