#4204
| Problema | esteArbore | Operații I/O |
estearbore.in/estearbore.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64104455 | Utilizator | |
| Fișier | estearbore.cpp | Dimensiune | 525 B |
| Data încărcării | 17 Aprilie 2026, 09:40 | Scor/rezultat | Eroare de compilare |
estearbore.cpp: In function ‘int main()’: estearbore.cpp:9:15: error: no match for ‘operator>’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘int’) 9 | while(fin>>vi>vf) | ~~~~~~~^~~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} estearbore.cpp:9:15: note: candidate: ‘operator>(int, int)’ (built-in) 9 | while(fin>>vi>vf) | ~~~~~~~^~~ estearbore.cpp:9:15: note: no known conversion for argument 1 from ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} to ‘int’ In file included from /usr/include/c++/13/string:48, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/istream:40, from /usr/include/c++/13/fstream:40, from estearbore.cpp:1: /usr/include/c++/13/bits/stl_iterator.h:469:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’ 469 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:469:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::reverse_iterator<_Iterator>’ 9 | while(fin>>vi>vf) | ^~ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’ 514 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::reverse_iterator<_Iterator>’ 9 | while(fin>>vi>vf) | ^~ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’ 1725 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::move_iterator<_IteratorL>’ 9 | while(fin>>vi>vf) | ^~ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’ 1784 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::move_iterator<_IteratorL>’ 9 | while(fin>>vi>vf) | ^~ In file included from /usr/include/c++/13/bits/stl_algobase.h:64, from /usr/include/c++/13/string:51: /usr/include/c++/13/bits/stl_pair.h:848:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’ 848 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_pair.h:848:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::pair<_T1, _T2>’ 9 | while(fin>>vi>vf) | ^~ In file included from /usr/include/c++/13/string:54: /usr/include/c++/13/bits/basic_string.h:3870:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3870 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3870:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 9 | while(fin>>vi>vf) | ^~ /usr/include/c++/13/bits/basic_string.h:3884:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’ 3884 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3884:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 9 | while(fin>>vi>vf) | ^~ /usr/include/c++/13/bits/basic_string.h:3897:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3897 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3897:5: note: template argument deduction/substitution failed: estearbore.cpp:9:16: note: mismatched types ‘const _CharT*’ and ‘std::basic_istream<char>’ 9 | while(fin>>vi>vf) | ^~ estearbore.cpp:10:5: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 10 | if(a[vi][vf]=a[vf][vi]=1; | ^ estearbore.cpp:11:2: error: expected primary-expression before ‘}’ token 11 | } | ^ estearbore.cpp:10:27: error: expected ‘)’ before ‘}’ token 10 | if(a[vi][vf]=a[vf][vi]=1; | ~ ^ | ) 11 | } | ~ estearbore.cpp:11:2: error: expected primary-expression before ‘}’ token 11 | } | ^ estearbore.cpp: At global scope: estearbore.cpp:12:2: error: ‘pi’ does not name a type 12 | pi=ps=1; | ^~ estearbore.cpp:13:6: error: ‘c’ does not name a type 13 | c[pi]=1; | ^ estearbore.cpp:14:2: error: ‘viz’ does not name a type 14 | viz[1]=1; | ^~~ estearbore.cpp:15:2: error: expected unqualified-id before ‘while’ 15 | while(ps<=pi) | ^~~~~ estearbore.cpp:24:2: error: expected unqualified-id before ‘if’ 24 | if(n==pi && n==m+1) | ^~ estearbore.cpp:26:5: error: expected unqualified-id before ‘else’ 26 | else | ^~~~ estearbore.cpp:28:2: error: ‘fin’ does not name a type 28 | fin.close(); | ^~~ estearbore.cpp:29:2: error: ‘fout’ does not name a type 29 | fout.close(); | ^~~~ estearbore.cpp:30:2: error: expected unqualified-id before ‘return’ 30 | return 0;} | ^~~~~~ estearbore.cpp:30:11: error: expected declaration before ‘}’ token 30 | return 0;} | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema esteArbore 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ă.