Borderou de evaluare (job #810641)

Utilizator avatar bogdan_ Goian Bogdan bogdan_ IP ascuns
Problemă Points 2 (clasele 8-9) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 21 feb. 2025 20:07:34 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:24:61: error: no match for 'operator-' (operand types are 'int' and 'std::vector<long long int>') 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ~^~~ | | | | | std::vector<long long int> | int In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_algobase.h:67, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/algorithm:60, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/i686-pc-linux-gnu/bits/stdc++.h:51, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: main.cpp:24:62: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ^~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: main.cpp:24:62: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ^~ In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/ccomplex:39, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/i686-pc-linux-gnu/bits/stdc++.h:127: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)' 370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:370:5: note: template argument deduction/substitution failed: main.cpp:24:62: note: mismatched types 'const std::complex<_Tp>' and 'int' 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ^~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)' 379 | operator-(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:379:5: note: template argument deduction/substitution failed: main.cpp:24:62: note: mismatched types 'const std::complex<_Tp>' and 'int' 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ^~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:388:5: note: template argument deduction/substitution failed: main.cpp:24:62: note: 'std::vector<long long int>' is not derived from 'const std::complex<_Tp>' 24 | {auto it=lower_bound(s1.begin(), s1.end(), t-s2); | ^~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x)