#670
Preordine
Se dă un arbore binar care conține valori numere naturale. Să se afișeze valorile din arbore în urma parcurgerii în preordine.
Problema | Preordine | Operații I/O |
![]() preordine.in /preordine.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51195159 | Utilizator | |
Fișier | preordine.cpp | Dimensiune | 700 B |
Data încărcării | 29 Mai 2024, 14:15 | Scor / rezultat | Eroare de compilare |
preordine.cpp:6:22: warning: missing terminating " character [enabled by default] ordine.out"); ^ preordine.cpp:6:12: error: missing terminating " character ordine.out"); ^ preordine.cpp:6:12: error: 'ordine' does not name a type preordine.cpp: In function 'void srd(int)': preordine.cpp:14:12: error: 'x' was not declared in this scope g<<x[nod]<<" "; ^ preordine.cpp:15:13: error: 'st' was not declared in this scope srd(st[nod]); ^ preordine.cpp:16:13: error: 'dr' was not declared in this scope srd(dr[nod]); ^ preordine.cpp: In function 'int main()': preordine.cpp:22:8: error: 'n' was not declared in this scope f>>n; ^ preordine.cpp:25:12: error: 'x' was not declared in this scope f>>x[i]>>st[i]>>dr[i]; ^ preordine.cpp:25:18: error: 'st' was not declared in this scope f>>x[i]>>st[i]>>dr[i]; ^ preordine.cpp:25:25: error: 'dr' was not declared in this scope f>>x[i]>>st[i]>>dr[i]; ^ preordine.cpp:32:19: error: 'st' was not declared in this scope if(i==st[j] or i==dr[j]) ^ preordine.cpp:32:31: error: 'dr' was not declared in this scope if(i==st[j] or i==dr[j]) ^ preordine.cpp:33:17: error: 'fr' was not declared in this scope fr[i]++; ^ preordine.cpp:39:12: error: 'fr' was not declared in this scope if(fr[i]==0) r=i; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Preordine 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ă.