Borderou de evaluare (job #3370413)

Utilizator viflaem2Granat Andrei Ionut viflaem2 Data 26 octombrie 2026 09:00:00
Problema Pamant Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:9:9: error: 'int index' redeclared as different kind of entity 9 | int n,m,index=-1,o=1; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/12.2.1/cstring:42, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:48, from main.cpp:1: /usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)' 61 | index (const char *__s, int __c) __THROW | ^~~~~ main.cpp: In function 'int DFS(int, int)': main.cpp:15:15: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<int> >' and '<unresolved overloaded function type>') 15 | componente[index].push_back(nod); | ^ In file included from /usr/include/c++/12.2.1/vector:64, from /usr/include/c++/12.2.1/functional:62, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71: /usr/include/c++/12.2.1/bits/stl_vector.h:1121:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; reference = std::vector<int>&; size_type = long unsigned int]' 1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1121:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} 1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1140:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; const_reference = const std::vector<int>&; size_type = long unsigned int]' 1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1140:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} 1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~ main.cpp:17:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 17 | for(int i=0;i<graf[nod].size();i++){ | ~^~~~~~~~~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:47:14: error: no post-increment operator for type 47 | index++; | ^~ main.cpp:52:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 52 | g<<index+1<<endl; | ~~~~~^~ main.cpp:53:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<=' 53 | for(int i=0;i<=index;i++) | ~^~~~~~~ main.cpp:56:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 56 | for(int i=0;i<critice.size();i++){ | ~^~~~~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?