#791
Se consideră un arbore binar în care nodurile memorează numere naturale nenule. Să se afișeze valorile memorate în nodurile terminale ale arborelui, în ordine crescătoare.
Problema | BiFrunze1 | Operații I/O |
![]() bifrunze1.in /bifrunze1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57647671 | Utilizator | |
Fișier | bifrunze1.cpp | Dimensiune | 720 B |
Data încărcării | 08 Aprilie 2025, 22:09 | Scor / rezultat | Eroare de compilare |
bifrunze1.cpp:8:9: error: field 'st' has incomplete type nod st,dr; ^ bifrunze1.cpp:8:12: error: field 'dr' has incomplete type nod st,dr; ^ bifrunze1.cpp: In function 'nod* Creare()': bifrunze1.cpp:19:14: error: 'struct nod' has no member named 'st' nou->st=Creare(); ^ bifrunze1.cpp:20:14: error: 'struct nod' has no member named 'dr' nou->dr=Creare(); ^ bifrunze1.cpp: In function 'void RSD(nod)': bifrunze1.cpp:28:9: error: could not convert 'r' from 'nod' to 'bool' if(r) ^ bifrunze1.cpp:30:14: error: base operand of '->' has non-pointer type 'nod' if (r->st==0 && r->dr==0) ^ bifrunze1.cpp:30:26: error: base operand of '->' has non-pointer type 'nod' if (r->st==0 && r->dr==0) ^ bifrunze1.cpp:31:23: error: base operand of '->' has non-pointer type 'nod' a[++cnt]=r->info; ^ bifrunze1.cpp:32:14: error: base operand of '->' has non-pointer type 'nod' RSD(r->st); ^ bifrunze1.cpp:33:14: error: base operand of '->' has non-pointer type 'nod' RSD(r->dr); ^ bifrunze1.cpp: In function 'int main()': bifrunze1.cpp:39:22: error: conversion from 'nod*' to non-scalar type 'nod' requested nod rad = Creare(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiFrunze1 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ă.