#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 | #64446583 | Utilizator | |
| Fișier | postordine.cpp | Dimensiune | 618 B |
| Data încărcării | 07 Mai 2026, 12:02 | Scor/rezultat | 100 puncte |
postordine.cpp: In function ‘int main()’: postordine.cpp:18:11: warning: unused variable ‘v’ [-Wunused-variable] 18 | int n,v[1001],i,j,f[1001]={0},nst=0,ndr=0,x; | ^ postordine.cpp:18:21: warning: unused variable ‘j’ [-Wunused-variable] 18 | int n,v[1001],i,j,f[1001]={0},nst=0,ndr=0,x; | ^ postordine.cpp:18:35: warning: unused variable ‘nst’ [-Wunused-variable] 18 | int n,v[1001],i,j,f[1001]={0},nst=0,ndr=0,x; | ^~~ postordine.cpp:18:41: warning: unused variable ‘ndr’ [-Wunused-variable] 18 | int n,v[1001],i,j,f[1001]={0},nst=0,ndr=0,x; | ^~~ In function ‘void SDR(int)’, inlined from ‘int main()’ at postordine.cpp:32:10: postordine.cpp:9:5: warning: ‘x’ may be used uninitialized [-Wmaybe-uninitialized] 9 | if(k!=0) | ^~ postordine.cpp: In function ‘int main()’: postordine.cpp:18:47: note: ‘x’ was declared here 18 | int n,v[1001],i,j,f[1001]={0},nst=0,ndr=0,x; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.001 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
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ă.