Borderou de evaluare (job #2094635)
Utilizator | Data | 26 decembrie 2017 12:39:57 | |
---|---|---|---|
Problema | Undo2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:25: error: ‘int index’ redeclared as different kind of symbol
int N, Q, x, s[200002], index;
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48,
from user.cpp:1:
/usr/include/string.h:482:1: error: previous declaration of ‘const char* index(const char*, int)’
index (__const char *__s, int __c) __THROW
^
user.cpp: In function ‘int Find(int, std::vector<int>&)’:
user.cpp:14:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(; step < v.size() - 1; step <<= 1);
^
user.cpp:18:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if((i + step < v.size()) && (v[i + step] <= index) && (s[v[i + step]] == x))
^
user.cpp:18:53: error: invalid operands of types ‘__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}’ and ‘<unresolved overloaded function type>’ to binary ‘operator<=’
if((i + step < v.size()) && (v[i + step] <= index) && (s[v[i + step]] == x))
^
user.cpp:22:23: error: invalid operands of types ‘__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}’ and ‘<unresolved overloaded function type>’ to binary ‘operator>’
if(!i && ((v[0] > index) || (s[v[0]] != x))) return 0;
^
user.cpp: In function ‘int main()’:
user.cpp:41:29: error: no pre-increment operator for type
s[++index] = x;
^
user.cpp:42:52: error: no matching function for call to ‘std::vector<int>::push_back(<unresolved overloaded function type>)’
position[x].push_back(index);
^
user.cpp:42:52: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from /usr/include/c++/4.8/bits/random.h:34,
from /usr/include/c++/4.8/random:50,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘const value_type& {aka const int&}’
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<int>::value_type&& {aka int&&}’
user.cpp:46:31: error: overloaded function with no contextual type information
index -= x;
^
user.cpp:50:31: error: overloaded function with no contextual type information
index += x;
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !