Borderou de evaluare (job #2845761)
Utilizator | Data | 8 februarie 2022 11:58:01 | |
---|---|---|---|
Problema | Twinperms | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:36:7: error: no match for 'operator+' (operand types are 'std::vector<std::pair<int, int> >' and 'int')
36 | sort(a+1,a+n+1);
| ~^~
| | |
| | int
| std::vector<std::pair<int, int> >
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:533:5: note: candidate: 'template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)'
533 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:533:5: note: template argument deduction/substitution failed:
main.cpp:36:8: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
36 | sort(a+1,a+n+1);
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1573:5: note: candidate: 'template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)'
1573 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1573:5: note: template argument deduction/substitution failed:
main.cpp:36:8: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
36 | sort(a+1,a+n+1);
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6032:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6032 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6032:5: note: template argument deduction/substitution failed:
main.cpp:36:8: note: 'std::vector<std::pair<int, int> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
36 | sort(a+1,a+n+1);
| ^
In file included from /usr/include/c++/10/string:56,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !