#675
BiFrunze
Se dă un arbore binar care conține valori numere naturale. Să se afișeze frunzele acestui arbore.
Problema | BiFrunze | Operații I/O |
bifrunze.in /bifrunze.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51188430 | Utilizator | |
Fișier | bifrunze.cpp | Dimensiune | 989 B |
Data încărcării | 29 Mai 2024, 10:08 | Scor / rezultat | Eroare de compilare |
bifrunze.cpp:41:7: error: "Preordine" is not a valid filename #670 Preordine ^ bifrunze.cpp:47:13: error: redefinition of 'std::ifstream cin' ifstream cin("preordine.in"); ^ bifrunze.cpp:5:10: error: 'std::ifstream cin' previously declared here ifstream cin("bifrunze.in"); ^ bifrunze.cpp:49:14: error: redefinition of 'std::ofstream cout' ofstream cout("preordine.out"); ^ bifrunze.cpp:7:10: error: 'std::ofstream cout' previously declared here ofstream cout("bifrunze.out"); ^ bifrunze.cpp:51:37: error: conflicting declaration 'int v [1001]' int n,st[1001]={},dr[1001]={},v[1001]={},i,r,viz[1001]; ^ bifrunze.cpp:15:2: error: 'v' has a previous declaration as 'nod v [1001]' }v[1001]; ^ bifrunze.cpp: In function 'void preordine(int)': bifrunze.cpp:61:13: error: cannot bind 'std::basic_ostream<char>' lvalue to 'std::basic_ostream<char>&&' cout<<v[r]<<" "; ^ In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from bifrunze.cpp:1: /usr/include/c++/4.8/ostream:602:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = nod]' operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) ^ bifrunze.cpp: In function 'int main()': bifrunze.cpp:71:5: error: redefinition of 'int main()' int main() ^ bifrunze.cpp:17:5: error: 'int main()' previously defined here int main() ^ bifrunze.cpp:81:14: error: cannot bind 'std::basic_istream<char>' lvalue to 'std::basic_istream<char>&&' cin>>v[i]>>st[i]>>dr[i]; ^ In file included from /usr/include/c++/4.8/fstream:38:0, from bifrunze.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = nod]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiFrunze 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ă.