Borderou de evaluare (job #3188164)

Utilizator theo2003Theodor Negrescu theo2003 Data 2 ianuarie 2024 00:15:04
Problema Segmente Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In lambda function: main.cpp:61:77: error: no matching function for call to 'popcount(int&)' 61 | std::sort(bitmasks, bitmasks + masks, [](int b1, int b2){return POPCOUNT(b1) < POPCOUNT(b2);}); | ^ In file included from /usr/include/c++/12.2.1/numeric:70, from main.cpp:2: /usr/include/c++/12.2.1/bit:426:5: note: candidate: 'template<class _Tp> constexpr std::_If_is_unsigned_integer<_Tp, int> std::popcount(_Tp)' 426 | popcount(_Tp __x) noexcept | ^~~~~~~~ /usr/include/c++/12.2.1/bit:426:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/12.2.1/bits/stl_pair.h:60, from /usr/include/c++/12.2.1/bits/stl_algobase.h:64, from /usr/include/c++/12.2.1/algorithm:60, from main.cpp:1: /usr/include/c++/12.2.1/type_traits: In substitution of 'template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = int]': /usr/include/c++/12.2.1/bit:379:11: required by substitution of 'template<class _Tp, class _Up> using _If_is_unsigned_integer = std::enable_if_t<std::__is_one_of<typename std::remove_cv< <template-parameter-1-1> >::type, unsigned char, short unsigned int, unsigned int, long unsigned int, long long unsigned int>::value, _Up> [with _Tp = int; _Up = int]' /usr/include/c++/12.2.1/bit:426:5: required by substitution of 'template<class _Tp> constexpr std::_If_is_unsigned_integer<_Tp, int> std::popcount(_Tp) [with _Tp = int]' main.cpp:61:77: required from here /usr/include/c++/12.2.1/type_traits:2608:11: error: no type named 'type' in 'struct std::enable_if<false, int>' 2608 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ main.cpp:61:92: error: no matching function for call to 'popcount(int&)' 61 | std::sort(bitmasks, bitmasks + masks, [](int b1, int b2){return POPCOUNT(b1) < POPCOUNT(b2);}); | ^ /usr/include/c++/12.2.1/bit:426:5: note: candidate: 'template<class _Tp> constexpr std::_If_is_unsigned_integer<_Tp, int> std::popcount(_Tp)' 426 | popcount(_Tp __x) noexcept | ^~~~~~~~ /usr/include/c++/12.2.1/bit:426:5: note: template argument deduction/substitution failed: main.cpp: In function 'double solve_test(std::ifstream&)': main.cpp:67:20: error: no matching function for call to 'popcount(int&)' 67 | if(POPCOUNT(mask) < 2) { | ^ /usr/include/c++/12.2.1/bit:426:5: note: candidate: 'template<class _Tp> constexpr std::_If_is_unsigned_integer<_Tp, int> std::popcount(_Tp)' 426 | popcount(_Tp __x) noexcept | ^~~~~~~~ /usr/include/c++/12.2.1/bit:426:5: note: template argument deduction/substitution failed: Non zero exit status: 1

Ceva nu functioneaza?