#752
BiArbore
Se consideră un arbore binar alocat dinamic în care nodurile memorează numere naturale nenule. Să se determine valorile memorate în descendenții direcți ai rădăcinii arborelui.
Problema | BiArbore | Operații I/O |
biarbore.in /biarbore.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49694289 | Utilizator | |
Fișier | biarbore.cpp | Dimensiune | 466 B |
Data încărcării | 12 Martie 2024, 13:05 | Scor / rezultat | Eroare de compilare |
biarbore.cpp:1:2: error: invalid preprocessing directive #Include #Include <fstream> ^ biarbore.cpp:13:1: error: stray '\342' in program nod-›info=x; ^ biarbore.cpp:13:1: error: stray '\200' in program biarbore.cpp:13:1: error: stray '\272' in program biarbore.cpp:14:1: error: stray '\342' in program nod-›st=creare(); nod-›dr=creare(); ^ biarbore.cpp:14:1: error: stray '\200' in program biarbore.cpp:14:1: error: stray '\272' in program biarbore.cpp:14:1: error: stray '\342' in program biarbore.cpp:14:1: error: stray '\200' in program biarbore.cpp:14:1: error: stray '\272' in program biarbore.cpp:21:1: error: stray '\342' in program if(r->st!= NULL)out<<r->st->info<<” “; ^ biarbore.cpp:21:1: error: stray '\200' in program biarbore.cpp:21:1: error: stray '\235' in program biarbore.cpp:21:1: error: stray '\342' in program biarbore.cpp:21:1: error: stray '\200' in program biarbore.cpp:21:1: error: stray '\234' in program biarbore.cpp:22:1: error: stray '\343' in program else outく<0くく” “; ^ biarbore.cpp:22:1: error: stray '\201' in program biarbore.cpp:22:1: error: stray '\217' in program biarbore.cpp:22:1: error: stray '\343' in program biarbore.cpp:22:1: error: stray '\201' in program biarbore.cpp:22:1: error: stray '\217' in program biarbore.cpp:22:1: error: stray '\343' in program biarbore.cpp:22:1: error: stray '\201' in program biarbore.cpp:22:1: error: stray '\217' in program biarbore.cpp:22:1: error: stray '\342' in program biarbore.cpp:22:1: error: stray '\200' in program biarbore.cpp:22:1: error: stray '\235' in program biarbore.cpp:22:1: error: stray '\342' in program biarbore.cpp:22:1: error: stray '\200' in program biarbore.cpp:22:1: error: stray '\234' in program biarbore.cpp:3:1: error: 'ifstream' does not name a type ifstream in("biarbore.in"); ^ biarbore.cpp:4:1: error: 'ofstream' does not name a type ofstream out ("biarbore.out"); ^ biarbore.cpp: In function 'arb* creare()': biarbore.cpp:10:1: error: 'in' was not declared in this scope in>>x; ^ biarbore.cpp:11:17: error: 'NULL' was not declared in this scope if (x==0)return NULL; ^ biarbore.cpp:13:8: error: 'info' was not declared in this scope nod-›info=x; ^ biarbore.cpp:14:8: error: 'st' was not declared in this scope nod-›st=creare(); nod-›dr=creare(); ^ biarbore.cpp:14:28: error: 'dr' was not declared in this scope nod-›st=creare(); nod-›dr=creare(); ^ biarbore.cpp: In function 'int main()': biarbore.cpp:21:12: error: 'NULL' was not declared in this scope if(r->st!= NULL)out<<r->st->info<<” “; ^ biarbore.cpp:21:17: error: 'out' was not declared in this scope if(r->st!= NULL)out<<r->st->info<<” “; ^ biarbore.cpp:21:42: error: expected primary-expression before ';' token if(r->st!= NULL)out<<r->st->info<<” “; ^ biarbore.cpp:22:6: error: 'out' was not declared in this scope else outく<0くく” “; ^ biarbore.cpp:23:12: error: 'NULL' was not declared in this scope if(r->dr!= NULL)out<<r->dr->info; ^ biarbore.cpp:23:17: error: 'out' was not declared in this scope if(r->dr!= NULL)out<<r->dr->info; ^ biarbore.cpp:24:6: error: 'out' was not declared in this scope else out<<0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiArbore 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ă.