#3503
Biarbore1
Se consideră un arbore binar în care nodurile memorează numere naturale nenule. Să se determine valorile memorate în descendenții direcți ai rădăcinii arborelui.
Problema | Biarbore1 | Operații I/O |
biarbore1.in /biarbore1.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #54737909 | Utilizator | |
Fișier | biarbore1.cpp | Dimensiune | 474 B |
Data încărcării | 06 Decembrie 2024, 20:31 | Scor / rezultat | Eroare de compilare |
biarbore1.cpp: In function 'int main()': biarbore1.cpp:9:5: error: reference to 'cin' is ambiguous cin >> r >> st; ^ biarbore1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("biarbore1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from biarbore1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ biarbore1.cpp:12:9: error: reference to 'cin' is ambiguous cin >> dr; ^ biarbore1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("biarbore1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from biarbore1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ biarbore1.cpp:16:13: error: reference to 'cin' is ambiguous cin >> x; ^ biarbore1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("biarbore1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from biarbore1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ biarbore1.cpp:22:9: error: reference to 'cin' is ambiguous cin >> dr; ^ biarbore1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("biarbore1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from biarbore1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ biarbore1.cpp:24:5: error: reference to 'cout' is ambiguous cout << st << ' ' << dr; ^ biarbore1.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("biarbore1.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from biarbore1.cpp:1: /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 Biarbore1 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ă.