Borderou de evaluare (job #792322)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Siruri (clasa a 10-a) | Compilator | cpp-32 |
Rundă | cexgj_10_1 | Status | evaluat |
Dată | 2 nov. 2024 08:39:06 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:48: error: 'int index [100010]' redeclared as different kind of entity
6 | int n, m, x, a[100010], b[100010], index[100010];
| ^
In file included from /usr/include/string.h:462,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/cstring:42,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:121,
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:11:47: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
11 | for(int i=1; i<=n; i++) fin >> a[i], index[i] = 1;
| ^
main.cpp:19:37: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
19 | int val = a[i] + b[index[i]];
| ^
main.cpp:22:37: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
22 | if(sumMin <= x) cnt++, index[poz]++;
| ^