#757
BiMax
Se consideră un arbore binar în care nodurile memorează numere naturale nenule. Să se determine valorile maxime din subarborii stâng și drept ai rădăcinii.
Problema | BiMax | Operații I/O |
bimax.in /bimax.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22968117 | Utilizator | |
Fișier | bimax.cpp | Dimensiune | 687 B |
Data încărcării | 15 Mai 2020, 10:21 | Scor / rezultat | Eroare de compilare |
bimax.cpp:9:5: error: field 's' has incomplete type nod s,d; ^ bimax.cpp:9:7: error: field 'd' has incomplete type nod s,d; ^ bimax.cpp: In function 'void creare(nod&)': bimax.cpp:20:2: error: no match for 'operator=' (operand types are 'nod' and 'int') r=NULL; ^ bimax.cpp:20:2: note: candidates are: bimax.cpp:7:8: note: nod& nod::operator=(const nod&) struct nod{ ^ bimax.cpp:7:8: note: no known conversion for argument 1 from 'int' to 'const nod&' bimax.cpp:7:8: note: nod& nod::operator=(nod&&) bimax.cpp:7:8: note: no known conversion for argument 1 from 'int' to 'nod&&' bimax.cpp:24:2: error: no match for 'operator=' (operand types are 'nod' and 'nod*') r= new nod; ^ bimax.cpp:24:2: note: candidates are: bimax.cpp:7:8: note: nod& nod::operator=(const nod&) struct nod{ ^ bimax.cpp:7:8: note: no known conversion for argument 1 from 'nod*' to 'const nod&' bimax.cpp:7:8: note: nod& nod::operator=(nod&&) bimax.cpp:7:8: note: no known conversion for argument 1 from 'nod*' to 'nod&&' bimax.cpp:25:2: error: base operand of '->' has non-pointer type 'nod' r->inf=n; ^ bimax.cpp:26:10: error: base operand of '->' has non-pointer type 'nod' creare (r->s); ^ bimax.cpp:27:10: error: base operand of '->' has non-pointer type 'nod' creare (r->d); ^ bimax.cpp: At global scope: bimax.cpp:32:10: error: variable or field 'rsd' declared void void rsd(nodr,int &max1) ^ bimax.cpp:32:10: error: 'nodr' was not declared in this scope bimax.cpp:32:15: error: expected primary-expression before 'int' void rsd(nodr,int &max1) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiMax 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ă.