#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 | #43021078 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 586 B |
Data încărcării | 27 Martie 2023, 18:42 | Scor / rezultat | Eroare de compilare |
postordine.cpp:8:5: error: stray '\303' in program în>>n; ^ postordine.cpp:8:5: error: stray '\256' in program postordine.cpp:11:9: error: stray '\303' in program în>>v[i]>>st[i]>>dr[i]; ^ postordine.cpp:11:9: error: stray '\256' in program postordine.cpp:18:5: error: stray '\304' in program dacă(x>0) ^ postordine.cpp:18:5: error: stray '\203' in program postordine.cpp:22:5: error: stray '\304' in program afară<<v[x]<<" "; ^ postordine.cpp:22:5: error: stray '\203' in program postordine.cpp:29:4: error: stray '\303' in program în timp ce (aux) ^ postordine.cpp:29:4: error: stray '\256' in program postordine.cpp:35:4: error: stray '\304' in program returnează 0; ^ postordine.cpp:35:4: error: stray '\203' in program postordine.cpp:2:1: error: 'folosind' does not name a type folosind namespace std; ^ postordine.cpp:3:1: error: 'ifstream' does not name a type ifstream in ("postordine.in"); ^ postordine.cpp:4:1: error: 'ofstream' does not name a type ofstream out("postordine.out"); ^ postordine.cpp: In function 'void citire()': postordine.cpp:8:8: warning: statement has no effect [-Wunused-value] în>>n; ^ postordine.cpp:11:25: warning: statement has no effect [-Wunused-value] în>>v[i]>>st[i]>>dr[i]; ^ postordine.cpp: In function 'void sdr(int)': postordine.cpp:18:14: error: 'dac' was not declared in this scope dacă(x>0) ^ postordine.cpp:19:5: error: expected ';' before '{' token { ^ postordine.cpp: In function 'int main()': postordine.cpp:29:8: error: expected ';' before 'timp' în timp ce (aux) ^ postordine.cpp:33:4: warning: statement has no effect [-Wunused-value] } ^ postordine.cpp:35:4: error: 'returneaz' was not declared in this scope returnează 0; ^ postordine.cpp:35:16: error: expected ';' before numeric constant returnează 0; ^ postordine.cpp:28:8: warning: unused variable 'aux' [-Wunused-variable] int aux=1,rez; ^
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ă.