#4159
Nivele11
Se dă vectorul de tați al unui arbore cu rădăcină cu n
noduri. Afișați parcurgerea pe nivele a arborelui dat.
Problema | Nivele11 | Operații I/O |
nivele11.in /nivele11.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49134182 | Utilizator | |
Fișier | nivele11.cpp | Dimensiune | 871 B |
Data încărcării | 16 Februarie 2024, 11:53 | Scor / rezultat | Eroare de compilare |
nivele11.cpp:5:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("nivele11.in"); ^ nivele11.cpp:6:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("nivele11.out"); ^ nivele11.cpp: In function 'int main()': nivele11.cpp:32:5: error: reference to 'cin' is ambiguous cin>>n; ^ nivele11.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("nivele11.in"); ^ In file included from nivele11.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ nivele11.cpp:35:9: error: reference to 'cin' is ambiguous cin>>tati[i]; ^ nivele11.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("nivele11.in"); ^ In file included from nivele11.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ nivele11.cpp:44:17: error: reference to 'cout' is ambiguous cout<<j<<' '; ^ nivele11.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("nivele11.out"); ^ In file included from nivele11.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ nivele11.cpp:45:9: error: reference to 'cout' is ambiguous cout<<endl; ^ nivele11.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("nivele11.out"); ^ In file included from nivele11.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 Nivele11 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ă.