Borderou de evaluare (job #3237347)
Utilizator | Data | 8 iulie 2024 15:06:20 | |
---|---|---|---|
Problema | Arbore partial de cost minim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:11:26: error: 'std::vector<int> index' redeclared as different kind of entity
11 | vector<int> index(MAX_NUM);
| ^
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 main()':
main.cpp:32:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
32 | index[i] = i;
| ^
main.cpp:37:16: error: overloaded function with no contextual type information
37 | sort(index.begin() + 1, index.begin() + m + 1, sortCrt);
| ^~~~~
main.cpp:37:35: error: overloaded function with no contextual type information
37 | sort(index.begin() + 1, index.begin() + m + 1, sortCrt);
| ^~~~~
main.cpp:41:24: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
41 | int u = x[index[i]];
| ^
main.cpp:42:24: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
42 | int v = y[index[i]];
| ^
main.cpp:44:33: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
44 | answer += cost[index[i]];
| ^
main.cpp:46:38: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
46 | solutions.push_back(index[i]);
| ^
main.cpp:51:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
51 | for (int i = 0; i < solutions.size(); ++i) {
| ~~^~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !