Borderou de evaluare (job #2928807)

Utilizator readyitzooDilirici Mihai readyitzoo Data 23 octombrie 2022 22:00:05
Problema Componente tare conexe Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:5: error: 'int index' redeclared as different kind of entity 10 | int index=1; | ^~~~~ In file included from /usr/include/string.h:432, from /usr/include/c++/10/cstring:42, from /usr/include/x86_64-linux-gnu/c++/10/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 'void DFS_t(std::vector<std::vector<int> >, int, int, int)': main.cpp:17:22: 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 < graph_t[x].size(); i ++){ | ~~^~~~~~~~~~~~~~~~~~~ main.cpp: In function 'void DFS(std::vector<std::vector<int> >, int, int)': main.cpp:26:18: error: cannot resolve overloaded function 'index' based on conversion to type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} 26 | visited[x] = index; | ^~~~~ main.cpp:27:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 27 | for(int i = 0; i < graph[x].size(); i ++){ | ~~^~~~~~~~~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:64:39: error: cannot resolve overloaded function 'index' based on conversion to type 'int' 64 | DFS_t(graph_t, n, x, index); | ^ main.cpp:66:31: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator==' 66 | if(visited[i] == index){ main.cpp:71:22: error: overloaded function with no contextual type information 71 | index += 1; | ^ main.cpp:74:16: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-' 74 | g << index - 1 << endl; | ~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?