Borderou de evaluare (job #3303357)
| Utilizator | Data | 15 iulie 2025 12:00:47 | |
|---|---|---|---|
| Problema | Inv | Status | done |
| Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'void AIB::update(int, int)':
main.cpp:37:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | for (int i = poz ; i < aib.size() ; i += lsb(i))
| ~~^~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:69:15: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} to 'int'
69 | aib.update(v[n],1);
| ~~~~~~~~~~^~~~~~~~
main.cpp:35:21: note: initializing argument 1 of 'void AIB::update(int, int)'
35 | void update(int poz,int val)
| ~~~~^~~
main.cpp:73:31: error: no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} and 'int')
73 | nriv += aib.query(v[i]-1);
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:67,
from /usr/include/c++/12.2.1/bits/specfun.h:45,
from /usr/include/c++/12.2.1/cmath:1935,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
main.cpp:73:32: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} is not derived from 'const std::reverse_iterator<_IteratorL>'
73 | nriv += aib.query(v[i]-1);
| ^
/usr/include/c++/12.2.1/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
main.cpp:73:32: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} is not derived from 'const std::move_iterator<_IteratorL>'
73 | nriv += aib.query(v[i]-1);
| ^
In file included from /usr/include/c++/12.2.1/ccomplex:39,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54:
/usr/include/c++/12.2.1/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/12.2.1/complex:362:5: note: template argument deduction/substitution failed:
main.cpp:73:32: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} is not derived from 'const std::complex<_Tp>'
73 | nriv += aib.query(v[i]-1);
| ^
/usr/include/c++/12.2.1/complex:371:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/12.2.1/complex:371:5: note: template argument deduction/substitution failed:
main.cpp:73:32: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'std::pair<int, long long int>'} is not derived from 'const std::complex<_Tp>'
73 | nriv += aib.query(v[i]-1);
| ^
/usr/include/c++/12.2.1/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
