#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 | #35951029 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 1.15 KB |
Data încărcării | 29 Martie 2022, 13:02 | Scor / rezultat | Eroare de compilare |
postordine.cpp:42:13: error: redefinition of 'std::ifstream cin' ifstream cin("postordine.in"); ^ postordine.cpp:5:10: error: 'std::ifstream cin' previously declared here ifstream cin("inordine.in"); ^ postordine.cpp:43:14: error: redefinition of 'std::ofstream cout' ofstream cout("postordine.out"); ^ postordine.cpp:6:10: error: 'std::ofstream cout' previously declared here ofstream cout("inordine.out"); ^ postordine.cpp:45:11: error: redefinition of 'const int N' const int N=1e3+1; ^ postordine.cpp:8:11: error: 'const int N' previously defined here const int N=1e3+1; ^ postordine.cpp:47:5: error: redefinition of 'int n' int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:10:5: error: 'int n' previously declared here int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:47:13: error: redefinition of 'int info [1001]' int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:10:7: error: 'int info [1001]' previously declared here int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:47:19: error: redefinition of 'int st [1001]' int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:10:15: error: 'int st [1001]' previously declared here int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:47:25: error: redefinition of 'int dr [1001]' int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:10:21: error: 'int dr [1001]' previously declared here int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:47:30: error: redefinition of 'int v [1001]' int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp:10:27: error: 'int v [1001]' previously declared here int n,info[N],st[N],dr[N],v[N]; ^ postordine.cpp: In function 'void inordine(int)': postordine.cpp:49:6: error: redefinition of 'void inordine(int)' void inordine(int nod) ^ postordine.cpp:12:6: error: 'void inordine(int)' previously defined here void inordine(int nod) ^ postordine.cpp: In function 'int main()': postordine.cpp:60:5: error: redefinition of 'int main()' int main() ^ postordine.cpp:22:5: error: 'int main()' previously defined here int main() ^
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ă.