Borderou de evaluare (job #2619011)
Utilizator | Data | 26 mai 2020 18:39:29 | |
---|---|---|---|
Problema | Mit | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:5:28: error: 'int index' redeclared as different kind of symbol
int n, m, a[200001], i, j, index, l, r, bonus, command, maxim;
^~~~~
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:49:29: error: overloaded function with no contextual type information
index = j;
^
main.cpp:50:28: error: invalid types 'int [(n * 2)][<unresolved overloaded function type>]' for array subscript
a[index] += bonus;
^
main.cpp:51:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
while(index > 1){
~~~~~~^~~
main.cpp:52:39: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator/'
index = index / 2;
~~~~~~^~~
main.cpp:53:32: error: invalid types 'int [(n * 2)][<unresolved overloaded function type>]' for array subscript
a[index] = max(a[index * 2], a[index * 2 + 1]);
^
main.cpp:53:48: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator*'
a[index] = max(a[index * 2], a[index * 2 + 1]);
~~~~~~^~~
main.cpp:53:62: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator*'
a[index] = max(a[index * 2], a[index * 2 + 1]);
~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !