#672
Postordine
Se dă un arbore binar care conține valori numere naturale. Să se afișeze valorile din arbore în urma parcurgerii în postordine.
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 | #35422228 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 893 B |
Data încărcării | 09 Martie 2022, 07:46 | Scor / rezultat | Eroare de compilare |
postordine.cpp:2:1: error: 'ifstream' does not name a type ifstream fin("postordine.in"); ^ postordine.cpp:3:1: error: 'ofstream' does not name a type ofstream fout("postordine.out"); ^ postordine.cpp: In function 'void citire()': postordine.cpp:8:5: error: 'fin' was not declared in this scope fin>>n; ^ postordine.cpp: In function 'void preordine(int)': postordine.cpp:25:9: error: 'fout' was not declared in this scope fout<<val[nod]<<' '; ^ postordine.cpp: In function 'void inordine(int)': postordine.cpp:36:9: error: 'fout' was not declared in this scope fout<<val[nod]<<' '; ^ postordine.cpp: In function 'void postordine(int)': postordine.cpp:47:9: error: 'fout' was not declared in this scope fout<<val[nod]<<' '; ^
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ă.