Borderou de evaluare (job #1236977)
Utilizator | Data | 2 octombrie 2014 22:29:17 | |
---|---|---|---|
Problema | Arbori de intervale | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In member function ‘void SegmentTree<DataType>::update(int, int, int, const int&, const int&)’:
user.cpp:54:8: error: ‘position’ was not declared in this scope
if (position <= mid) {
^
user.cpp: In member function ‘void SegmentTree<DataType>::update(const int&, const int&)’:
user.cpp:76:23: error: ‘position’ was not declared in this scope
update(1, 1, size, position, value);
^
user.cpp: In function ‘int main()’:
user.cpp:95:9: error: conflicting declaration ‘int a’
int t, a, b;
^
user.cpp:89:14: error: ‘a’ has a previous declaration as ‘std::vector<int> a’
vector<int> a(n);
^
user.cpp:97:7: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’
cin >> t >> a >> b;
^
In file included from /usr/include/c++/4.8/fstream:38:0,
from user.cpp:1:
/usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::vector<int>]’
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
user.cpp:99:27: error: no matching function for call to ‘SegmentTree<int>::query(std::vector<int>&, int&)’
cout << tree.query(a, b) << "\n";
^
user.cpp:99:27: note: candidates are:
user.cpp:33:6: note: int SegmentTree<DataType>::query(int, int, int, int, int) [with DataType = int]
int query(int node,int l,int r, int queryLeft,int queryRight) {
^
user.cpp:33:6: note: candidate expects 5 arguments, 2 provided
user.cpp:79:7: note: int SegmentTree<DataType>::query(const int&, const int&) [with DataType = int]
int query(const int& l,const int& r) {
^
user.cpp:79:7: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘const int&’
user.cpp:102:20: error: no matching function for call to ‘SegmentTree<int>::update(std::vector<int>&, int&)’
tree.update(a, b);
^
user.cpp:102:20: note: candidates are:
user.cpp:49:8: note: void SegmentTree<DataType>::update(int, int, int, const int&, const int&) [with DataType = int]
void update(int node, int l, int r, const int& postion, const int& value) {
^
user.cpp:49:8: note: candidate expects 5 arguments, 2 provided
user.cpp:75:8: note: void SegmentTree<DataType>::update(const int&, const int&) [with DataType = int]
void update(const int& postion, const int& value) {
^
user.cpp:75:8: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘const int&’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !