#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 | #53417622 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 866 B |
Data încărcării | 29 Octombrie 2024, 14:41 | Scor / rezultat | Eroare de compilare |
postordine.cpp:8:13: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ postordine.cpp:8:21: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ postordine.cpp:8:29: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ postordine.cpp: In function 'void citire()': postordine.cpp:14:16: error: 'info' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ postordine.cpp:14:27: error: 'st' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ postordine.cpp:14:36: error: 'dr' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ postordine.cpp: In function 'int radacina()': postordine.cpp:19:11: error: 'NN' was not declared in this scope int v[NN]; ^ postordine.cpp:21:9: error: 'v' was not declared in this scope v[i] = 0; ^ postordine.cpp:24:12: error: 'st' was not declared in this scope if(st[i] != 0) ^ postordine.cpp:25:13: error: 'v' was not declared in this scope v[st[i]] = 1; ^ postordine.cpp:26:12: error: 'dr' was not declared in this scope if(dr[i] != 0) ^ postordine.cpp:27:13: error: 'v' was not declared in this scope v[dr[i]] = 1; ^ postordine.cpp:30:12: error: 'v' was not declared in this scope if(v[i] == 0) ^ postordine.cpp: In function 'void postordine(int)': postordine.cpp:39:20: error: 'st' was not declared in this scope postordine(st[x]); ^ postordine.cpp:40:20: error: 'dr' was not declared in this scope postordine(dr[x]); ^ postordine.cpp:41:17: error: 'info' was not declared in this scope fout << info[x] << " "; ^
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ă.