Borderou de evaluare (job #2796691)

Utilizator AndreeaGeamanuAndreea AndreeaGeamanu Data 8 noiembrie 2021 17:23:40
Problema Componente tare conexe Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:12:15: error: 'int index [100010]' redeclared as different kind of entity 12 | int index[nmax], viz[nmax]={0}, dmin[nmax], i=0, nr=0; | ^ 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:3: /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 Tarjan(int)': main.cpp:18:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 18 | index[nod] = i; | ^ main.cpp:24:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 24 | for(int j=0; j<la[nod].size(); j++){ | ~^~~~~~~~~~~~~~~ main.cpp:25:17: error: invalid types '<unresolved overloaded function type>[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript 25 | if(index[la[nod][j]]==-1){ | ^ main.cpp:30:43: error: invalid types '<unresolved overloaded function type>[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript 30 | dmin[nod]=min(dmin[nod], index[la[nod][j]]); | ^ main.cpp:34:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 34 | if(index[nod]==dmin[nod]){ | ^ main.cpp: In function 'int main()': main.cpp:58:23: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive] 58 | memset(index, -1, sizeof(index)); | ^~~~~~~~~~~~~ main.cpp:58:36: error: cannot resolve overloaded function 'index' based on conversion to type 'void*' 58 | memset(index, -1, sizeof(index)); | ^ main.cpp:62:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 62 | if(index[j]==-1){ | ^ main.cpp:69:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 69 | for(int l=0; l<conex[k].size(); l++){ | ~^~~~~~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?