Borderou de evaluare (job #2295207)
Utilizator | Data | 3 decembrie 2018 12:58:04 | |
---|---|---|---|
Problema | Range minimum query | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'std::vector<int> rmq(const std::vector<int>&, const std::vector<std::pair<int, int> >&)':
main.cpp:18:15: error: request for member 'push_back' in 'min_sqrt', which is of non-class type 'std::vector<int>()'
min_sqrt.push_back(999999999);
^~~~~~~~~
main.cpp:20:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (min_sqrt[i] > input[j])
^
main.cpp:20:42: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (min_sqrt[i] > input[j])
^
main.cpp:21:35: warning: pointer to a function used in arithmetic [-Wpointer-arith]
min_sqrt[i] = input[j];
^
main.cpp:21:46: error: assignment of read-only location '*(min_sqrt + ((sizetype)i))'
min_sqrt[i] = input[j];
^
main.cpp:21:46: error: cannot convert 'const value_type {aka const int}' to 'std::vector<int>()' in assignment
main.cpp:26:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < queries.size(); i++) {
~~^~~~~~~~~~~~~~~~
main.cpp:38:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
m = min(m, min_sqrt[j - 1]);
^
main.cpp:38:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:38:47: error: no matching function for call to 'min(int&, std::vector<int> (&)())'
m = min(m, min_sqrt[j - 1]);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:2:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
main.cpp:38:47: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::vector<int>()')
m = min(m, min_sqrt[j - 1]);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:2:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
main.cpp:38:47: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::vector<int>()')
m = min(m, min_sqrt[j - 1]);
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !