Borderou de evaluare (job #2935461)
Utilizator | Data | 6 noiembrie 2022 19:06:41 | |
---|---|---|---|
Problema | Componente tare conexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:5: error: 'int index' redeclared as different kind of entity
6 | 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:14:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | 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:25:12: error: cannot resolve overloaded function 'index' based on conversion to type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
25 | viz[x]=index;
| ^~~~~
main.cpp:26:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
26 | for(int i=0;i<graph[x].size();i++){
| ~^~~~~~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:70:39: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
70 | DFS_t(graph_t, n, x, index);
| ^
main.cpp:73:26: 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=='
73 | if(viz[i]==index){
main.cpp:78:20: error: overloaded function with no contextual type information
78 | index+=1;
| ^
main.cpp:85:13: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
85 | g<<index-1<<"\n";
| ~~~~~^~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !