#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 | #2605831 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 609 B |
Data încărcării | 08 Iunie 2016, 08:39 | Scor / rezultat | Eroare de compilare |
postordine.cpp: In function 'int main()': postordine.cpp:21:26: error: 'radacina' was not declared in this scope postordine (radacina()) ^ postordine.cpp:21:27: error: 'postordine' was not declared in this scope postordine (radacina()) ^ postordine.cpp:24:1: error: expected ';' before 'fin' fin.close(); ^ postordine.cpp: In function 'void postordine()': postordine.cpp:29:11: error: 'i' was not declared in this scope if (a[i]==0) ^ postordine.cpp:30:16: error: return-statement with a value, in function returning 'void' [-fpermissive] return 0; ^ postordine.cpp:31:17: error: 'i' was not declared in this scope postordine (a[i].st) ^ postordine.cpp:32:3: error: expected ';' before 'postordine' postordine (a[i].dr) ^ postordine.cpp: In function 'int radacina()': postordine.cpp:41:5: error: 's' was not declared in this scope s[i]=false; ^ postordine.cpp:43:5: error: 's' was not declared in this scope s[j]=false; ^ postordine.cpp:39:6: warning: unused variable 'c' [-Wunused-variable] bool c[100005]; ^ postordine.cpp:46:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
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ă.