Borderou de evaluare (job #747131)

Utilizator avatar LukaA77 Anastase Luca Geroge LukaA77 IP ascuns
Problemă GPS Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 24 nov. 2023 18:07:31 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:95:15: error: 'i' was not declared in this scope 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ^ main.cpp:95:40: error: no match for 'operator+' (operand types are 'std::vector<Point>' and 'int') 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ~~~~~ ^ ~ | | | | | int | std::vector<Point> In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:67, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/algorithm:60, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:51, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:634:5: note: candidate: 'template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 634 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:634:5: note: template argument deduction/substitution failed: main.cpp:95:42: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1808:5: note: candidate: 'template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1808 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1808:5: note: template argument deduction/substitution failed: main.cpp:95:42: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ^ In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/string:54, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bitset:52, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:52: /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3541:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3541 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3541:5: note: template argument deduction/substitution failed: main.cpp:95:42: note: 'std::vector<Point>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3559:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3559 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3559:5: note: template argument deduction/substitution failed: main.cpp:95:42: note: mismatched types 'const _CharT*' and 'std::vector<Point>' 95 | coord[i].y = lower_bound(coord + 1, coord + N + 1, coord[i].y) + 1; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3578:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3578 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3578:5: note: template argument deduction/substitution failed: main.cpp:95:42: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int'