Detalii evaluare #61111793

Rezumat problemă

Se dă un graf orientat cu n noduri. Să se determine câte componente tare conexe ale grafului sunt formate dintr-un singur nod.

Detalii

Problema ComponenteTC Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #61111793 Utilizator Maria Stanescu (mhjfyujmmkdgtjkdugmj)
Fișier componentetc.cpp Dimensiune 995 B
Data încărcării 19 Noiembrie 2025, 16:23 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

In file included from /usr/include/c++/4.8/ext/alloc_traits.h:36:0,
                 from /usr/include/c++/4.8/bits/stl_construct.h:61,
                 from /usr/include/c++/4.8/vector:62,
                 from componentetc.cpp:2:
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:90:43: error: 'int' is not a class, struct, or union type
       typedef typename _Alloc::value_type value_type;
                                           ^
/usr/include/c++/4.8/bits/alloc_traits.h:100:1: error: no matching function for call to 'std::allocator_traits<int>::_S_pointer_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(pointer, value_type*)
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:100:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:100:1: note: template<class _Tp> static typename _Tp::pointer std::allocator_traits<_Alloc>::_S_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(pointer, value_type*)
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:100:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::pointer std::allocator_traits<_Alloc>::_S_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:100:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:100:1: error: 'int' is not a class, struct, or union type
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:109:1: error: no matching function for call to 'std::allocator_traits<int>::_S_const_pointer_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(const_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:109:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:109:1: note: template<class _Tp> static typename _Tp::const_pointer std::allocator_traits<_Alloc>::_S_const_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(const_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:109:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::const_pointer std::allocator_traits<_Alloc>::_S_const_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:109:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:109:1: error: 'int' is not a class, struct, or union type
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:120:1: error: no matching function for call to 'std::allocator_traits<int>::_S_void_pointer_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:120:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:120:1: note: template<class _Tp> static typename _Tp::void_pointer std::allocator_traits<_Alloc>::_S_void_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:120:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::void_pointer std::allocator_traits<_Alloc>::_S_void_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:120:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:120:1: error: 'int' is not a class, struct, or union type
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:131:1: error: no matching function for call to 'std::allocator_traits<int>::_S_const_void_pointer_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:131:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:131:1: note: template<class _Tp> static typename _Tp::const_void_pointer std::allocator_traits<_Alloc>::_S_const_void_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:131:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::const_void_pointer std::allocator_traits<_Alloc>::_S_const_void_pointer_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:131:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:131:1: error: 'int' is not a class, struct, or union type
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:142:1: error: no matching function for call to 'std::allocator_traits<int>::_S_difference_type_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:142:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:142:1: note: template<class _Tp> static typename _Tp::difference_type std::allocator_traits<_Alloc>::_S_difference_type_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:142:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::difference_type std::allocator_traits<_Alloc>::_S_difference_type_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:142:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:142:1: error: 'int' is not a class, struct, or union type
/usr/include/c++/4.8/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<int>':
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:153:1: error: no matching function for call to 'std::allocator_traits<int>::_S_size_type_helper(int*)'
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:153:1: note: candidate is:
/usr/include/c++/4.8/bits/alloc_traits.h:153:1: note: template<class _Tp> static typename _Tp::size_type std::allocator_traits<_Alloc>::_S_size_type_helper(_Tp*) [with _Tp = _Tp; _Alloc = int]
 _GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type,
 ^
/usr/include/c++/4.8/bits/alloc_traits.h:153:1: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Tp> static typename _Tp::size_type std::allocator_traits<_Alloc>::_S_size_type_helper(_Tp*) [with _Tp = _Tp; _Alloc = int] [with _Tp = int]':
/usr/include/c++/4.8/bits/alloc_traits.h:153:1:   required from 'struct std::allocator_traits<int>'
/usr/include/c++/4.8/ext/alloc_traits.h:121:10:   required from 'struct __gnu_cxx::__alloc_traits<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:153:1: error: 'int' is not a class, struct, or union type
In file included from /usr/include/c++/4.8/bits/stl_construct.h:61:0,
                 from /usr/include/c++/4.8/vector:62,
                 from componentetc.cpp:2:
/usr/include/c++/4.8/ext/alloc_traits.h: In instantiation of 'struct __gnu_cxx::__alloc_traits<int>':
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/ext/alloc_traits.h:137:23: error: no members matching '__gnu_cxx::__alloc_traits<int>::_Base_type {aka std::allocator_traits<int>}::allocate' in '__gnu_cxx::__alloc_traits<int>::_Base_type {aka struct std::allocator_traits<int>}'
     using _Base_type::allocate;
                       ^
/usr/include/c++/4.8/ext/alloc_traits.h:138:23: error: no members matching '__gnu_cxx::__alloc_traits<int>::_Base_type {aka std::allocator_traits<int>}::deallocate' in '__gnu_cxx::__alloc_traits<int>::_Base_type {aka struct std::allocator_traits<int>}'
     using _Base_type::deallocate;
                       ^
/usr/include/c++/4.8/ext/alloc_traits.h:141:23: error: no members matching '__gnu_cxx::__alloc_traits<int>::_Base_type {aka std::allocator_traits<int>}::max_size' in '__gnu_cxx::__alloc_traits<int>::_Base_type {aka struct std::allocator_traits<int>}'
     using _Base_type::max_size;
                       ^
In file included from /usr/include/c++/4.8/ext/alloc_traits.h:36:0,
                 from /usr/include/c++/4.8/bits/stl_construct.h:61,
                 from /usr/include/c++/4.8/vector:62,
                 from componentetc.cpp:2:
/usr/include/c++/4.8/bits/alloc_traits.h: In substitution of 'template<class _Alloc> template<class _Tp> using rebind_alloc = typename std::__alloctr_rebind<_Alloc, _Tp>::__type [with _Tp = int; _Alloc = int]':
/usr/include/c++/4.8/ext/alloc_traits.h:196:65:   required from 'struct __gnu_cxx::__alloc_traits<int>::rebind<int>'
/usr/include/c++/4.8/bits/stl_vector.h:75:28:   required from 'struct std::_Vector_base<int, int>'
/usr/include/c++/4.8/bits/stl_vector.h:210:11:   required from 'class std::vector<int, int>'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/alloc_traits.h:202:76: error: invalid use of incomplete type 'struct std::__alloctr_rebind<int, int, false>'
         using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
                                                                            ^
/usr/include/c++/4.8/bits/alloc_traits.h:65:12: error: declaration of 'struct std::__alloctr_rebind<int, int, false>'
     struct __alloctr_rebind;
            ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from componentetc.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'class std::vector<int, int>':
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:213:58: error: 'int' is not a class, struct, or union type
       typedef typename _Alloc::value_type                _Alloc_value_type;
                                                          ^
/usr/include/c++/4.8/bits/stl_vector.h:237:20: error: no members matching 'std::vector<int, int>::_Base {aka std::_Vector_base<int, int>}::_M_allocate' in 'std::vector<int, int>::_Base {aka struct std::_Vector_base<int, int>}'
       using _Base::_M_allocate;
                    ^
/usr/include/c++/4.8/bits/stl_vector.h:238:20: error: no members matching 'std::vector<int, int>::_Base {aka std::_Vector_base<int, int>}::_M_deallocate' in 'std::vector<int, int>::_Base {aka struct std::_Vector_base<int, int>}'
       using _Base::_M_deallocate;
                    ^
/usr/include/c++/4.8/bits/stl_vector.h:240:20: error: no members matching 'std::vector<int, int>::_Base {aka std::_Vector_base<int, int>}::_M_get_Tp_allocator' in 'std::vector<int, int>::_Base {aka struct std::_Vector_base<int, int>}'
       using _Base::_M_get_Tp_allocator;
                    ^
componentetc.cpp: In function 'void dfs1(int)':
componentetc.cpp:11:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=0;i<v1[x].size();i++)

                          ^
componentetc.cpp:13:21: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
         if(fr1[v1[x][i]]==0)

                     ^
componentetc.cpp:14:23: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
             dfs1(v1[x][i]);

                       ^
componentetc.cpp: In function 'void dfs2(int)':
componentetc.cpp:21:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=1;i<v2[x].size();i++)

                          ^
componentetc.cpp:23:21: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
         if(fr2[v2[x][i]]==0)

                     ^
componentetc.cpp:24:23: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
             dfs2(v2[x][i]);

                       ^
componentetc.cpp: In function 'int main(int, const char**)':
componentetc.cpp:48:17: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
         if(fr2[t[i]]==0)

                 ^
componentetc.cpp:50:19: error: no match for 'operator[]' (operand types are 'std::vector<int, int>' and 'int')
             dfs2(t[i]);

                   ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from componentetc.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = int; _Alloc = int]':
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:416:30: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_start'
         _M_get_Tp_allocator()); }
                              ^
/usr/include/c++/4.8/bits/stl_vector.h:416:30: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_finish'
/usr/include/c++/4.8/bits/stl_vector.h:416:29: error: '_M_get_Tp_allocator' was not declared in this scope
         _M_get_Tp_allocator()); }
                             ^
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = int; std::vector<_Tp, _Alloc>::size_type = unsigned int]':
componentetc.cpp:11:26:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:646:50: error: 'const struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_start'
       { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
                                                  ^
/usr/include/c++/4.8/bits/stl_vector.h:646:50: error: 'const struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_finish'
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = int; std::vector<_Tp, _Alloc>::value_type = int]':
componentetc.cpp:17:18:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:903:30: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_end_of_storage'
  if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
                              ^
/usr/include/c++/4.8/bits/stl_vector.h:903:30: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_finish'
/usr/include/c++/4.8/bits/stl_vector.h:906:34: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_finish'
                               __x);
                                  ^
/usr/include/c++/4.8/bits/stl_vector.h:907:6: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_finish'
      ++this->_M_impl._M_finish;
      ^
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int; _Alloc = int]':
/usr/include/c++/4.8/bits/stl_vector.h:249:15:   required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = int]'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:161:33: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_start'
         - this->_M_impl._M_start); }
                                 ^
/usr/include/c++/4.8/bits/stl_vector.h:161:9: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_start'
         - this->_M_impl._M_start); }
         ^
/usr/include/c++/4.8/bits/stl_vector.h:161:9: error: 'struct std::_Vector_base<int, int>::_Vector_impl' has no member named '_M_end_of_storage'
/usr/include/c++/4.8/bits/stl_vector.h:161:33: error: '_M_deallocate' was not declared in this scope
         - this->_M_impl._M_start); }
                                 ^
/usr/include/c++/4.8/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = int; _Alloc = int]':
/usr/include/c++/4.8/bits/stl_vector.h:125:17:   required from 'std::_Vector_base<_Tp, _Alloc>::_Vector_base() [with _Tp = int; _Alloc = int]'
/usr/include/c++/4.8/bits/stl_vector.h:249:15:   required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = int]'
componentetc.cpp:5:22:   required from here
/usr/include/c++/4.8/bits/stl_vector.h:87:68: error: using invalid field 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_M_start'
  : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0)
                                                                    ^
/usr/include/c++/4.8/bits/stl_vector.h:87:68: error: using invalid field 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_M_finish'
/usr/include/c++/4.8/bits/stl_vector.h:87:68: error: using invalid field 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_M_end_of_storage'

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema ComponenteTC face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.

Du-te sus!