#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 | #54718746 | Utilizator | |
Fișier | biarbore.cpp | Dimensiune | 580 B |
Data încărcării | 06 Decembrie 2024, 10:39 | Scor / rezultat | Eroare de compilare |
biarbore.cpp:4:14: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin ("biarbore.in"); ^ biarbore.cpp:5:15: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout ("biarbore.out "); ^ biarbore.cpp: In function 'void creare(nod*&)': biarbore.cpp:14:5: error: reference to 'cin' is ambiguous cin>>x; ^ biarbore.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin ("biarbore.in"); ^ In file included from biarbore.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ biarbore.cpp: In function 'int main()': biarbore.cpp:30:9: error: reference to 'cout' is ambiguous cout<<r->st->info<<' '; ^ biarbore.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("biarbore.out "); ^ In file included from biarbore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ biarbore.cpp:32:9: error: reference to 'cout' is ambiguous cout<<0<<' '; ^ biarbore.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("biarbore.out "); ^ In file included from biarbore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ biarbore.cpp:34:9: error: reference to 'cout' is ambiguous cout<<r->dr->info<<' '; ^ biarbore.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("biarbore.out "); ^ In file included from biarbore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ biarbore.cpp:36:9: error: reference to 'cout' is ambiguous cout<<0<<' '; ^ biarbore.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("biarbore.out "); ^ In file included from biarbore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
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ă.