Borderou de evaluare (job #2713566)
Utilizator | Data | 28 februarie 2021 11:34:50 | |
---|---|---|---|
Problema | Maxk | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:7:42: error: 'int index' redeclared as different kind of symbol
int n, k, v[NMAX], f[(int)1e5 + 5], len, index, minn = INT_MAX;
^~~~~
In file included from /usr/include/c++/6/cstring:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48,
from main.cpp:1:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
main.cpp: In function 'int main()':
main.cpp:10:11: error: overloaded function with no contextual type information
index = 1;
^
main.cpp:24:18: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
while (index <= i && f[v[index]] < k)
~~~~~~^~~~
main.cpp:24:35: error: invalid types 'int [1000005][<unresolved overloaded function type>]' for array subscript
while (index <= i && f[v[index]] < k)
^
main.cpp:25:18: error: invalid types 'int [1000005][<unresolved overloaded function type>]' for array subscript
++f[v[index]], ++index;
^
main.cpp:25:24: error: no pre-increment operator for type
++f[v[index]], ++index;
^~~~~
main.cpp:26:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
if (minn > i - index + 1 && !len)
~~^~~~~~~
main.cpp:27:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
minn = i - index + 1;
~~^~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !