Borderou de evaluare (job #682500)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Unique Characters (clasa a 9-a) | Compilator | cpp-32 |
| Rundă | Arhiva de probleme | Status | evaluat |
| Dată | 17 dec. 2022 14:27:19 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:10:16: error: 'int index [70][2]' redeclared as different kind of entity
10 | int index[70][2];
| ^
In file included from /usr/include/string.h:462,
from /usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/cstring:42,
from main.cpp:2:
/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:19:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
19 | index[i][0] = index[i][1] = -1;
| ^
main.cpp:19:36: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
19 | index[i][0] = index[i][1] = -1;
| ^
main.cpp:28:40: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
28 | ans += 1LL * (i - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:28:56: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
28 | ans += 1LL * (i - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:28:70: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
28 | ans += 1LL * (i - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:29:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
29 | index[c][0] = index[c][1];
| ^
main.cpp:29:36: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
29 | index[c][0] = index[c][1];
| ^
main.cpp:30:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
30 | index[c][1] = i;
| ^
main.cpp:36:40: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
36 | ans += 1LL * (n - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:36:56: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
36 | ans += 1LL * (n - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:36:70: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
36 | ans += 1LL * (n - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:42:40: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
42 | ans += 1LL * (n - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:42:56: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
42 | ans += 1LL * (n - index[c][1]) * (index[c][1] - index[c][0]);
| ^
main.cpp:42:70: error: invalid types '<unresolved overloaded function type>[int]' for array subscript