Borderou de evaluare (job #2337893)

Utilizator alexilasiAlex Ilasi alexilasi Data 6 februarie 2019 19:38:15
Problema Lowest Common Ancestor Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:17: error: 'int index' redeclared as different kind of symbol int n,m,i,j,x,y,index,loge,e; ^~~~~ In file included from /usr/include/c++/6/cstring:42:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48, from main.cpp:1: /usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)' index (const char *__s, int __c) __THROW ^~~~~ main.cpp: In function 'void dfs(int)': main.cpp:17:26: error: no pre-increment operator for type vertexes[vertex] = ++index; ^~~~~ main.cpp:18:21: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>') reverse_vertexes[index] = vertex; ^ In file included from /usr/include/c++/6/vector:64:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:795:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type {aka long unsigned int}' Non zero exit status: 1

Ceva nu functioneaza?