Borderou de evaluare (job #3335605)
| Utilizator | Data | 23 ianuarie 2026 00:52:53 | |
|---|---|---|---|
| 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:6:56: error: 'int index [200005]' redeclared as different kind of entity
6 | int n, m, x[200005], y[200005], c[200005], index[200005], t[200005];
| ^
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:25:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
25 | index[i] = i;
| ^
main.cpp:27:16: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
27 | sort (index+1, index+m+1, srt);
| ~~~~~^~
main.cpp:27:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
27 | sort (index+1, index+m+1, srt);
| ~~~~~^~
main.cpp:35:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
35 | p = grup (x[index[i]]);
| ^
main.cpp:36:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
36 | q = grup (y[index[i]]);
| ^
main.cpp:39:32: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
39 | cost_min += c[index[i]];
| ^
main.cpp:41:46: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
41 | ans.push_back (make_pair (x[index[i]], y[index[i]]));
| ^
main.cpp:41:59: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
41 | ans.push_back (make_pair (x[index[i]], y[index[i]]));
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
