Borderou de evaluare (job #1899264)
Utilizator | Data | 2 martie 2017 17:00:55 | |
---|---|---|---|
Problema | Arbori de intervale | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:26:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < a.size(); i++)
^
user.cpp:41:49: error: wrong number of template arguments (1, should be 5)
iterator <pair <int, vector <int> > > it = a[x / s].second.end();
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’
struct iterator
^
user.cpp:41:54: error: invalid type in declaration before ‘=’ token
iterator <pair <int, vector <int> > > it = a[x / s].second.end();
^
user.cpp:41:76: error: cannot convert ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ to ‘int’ in initialization
iterator <pair <int, vector <int> > > it = a[x / s].second.end();
^
user.cpp:43:21: error: cannot convert ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ to ‘int’ in assignment
else it = a[x / s].second.end();
^
user.cpp:44:73: error: no matching function for call to ‘max_element(__gnu_cxx::__normal_iterator<int*, std::vector<int> >, int&)’
int t = *(max_element( a[x / s].second.begin() + (x % s), it));
^
user.cpp:44:73: note: candidates are:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/usr/include/c++/4.8/bits/stl_algo.h:6298:5: note: template<class _FIter> _FIter std::max_element(_FIter, _FIter)
max_element(_ForwardIterator __first, _ForwardIterator __last)
^
/usr/include/c++/4.8/bits/stl_algo.h:6298:5: note: template argument deduction/substitution failed:
user.cpp:44:73: note: deduced conflicting types for parameter ‘_FIter’ (‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and ‘int’)
int t = *(max_element( a[x / s].second.begin() + (x % s), it));
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/usr/include/c++/4.8/bits/stl_algo.h:6326:5: note: template<class _FIter, class _Compare> _FIter std::max_element(_FIter, _FIter, _Compare)
max_element(_ForwardIterator __first, _ForwardIterator __last,
^
/usr/include/c++/4.8/bits/stl_algo.h:6326:5: note: template argument deduction/substitution failed:
user.cpp:44:73: note: deduced conflicting types for parameter ‘_FIter’ (‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and ‘int’)
int t = *(max_element( a[x / s].second.begin() + (x % s), it));
^
user.cpp:46:16: error: cannot convert ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ to ‘int’ in assignment
it = a[y / s].second.begin();
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !