Problem sortingtrainers
User pIaceholder
Submission Time 2023-11-27 17:45:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sortingtrainers.cpp: In function ‘int32_t main()’:
sortingtrainers.cpp:19:68: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘bool’
19 | trainers.push_back({a, b, std::min(a, b) > h, std::max(a, b) > h});
| ^
In file included from /usr/include/c++/9/vector:68,
from sortingtrainers.cpp:2:
/usr/include/c++/9/bits/stl_bvector.h:953:22: note: initializing argument 1 of ‘void std::vector<bool, _Alloc>::push_back(bool) [with _Alloc = std::allocator<bool>]’
953 | push_back(bool __x)
| ~~~~~^~~
sortingtrainers.cpp:25:21: error: ‘std::vector<bool>::reference’ {aka ‘struct std::_Bit_reference’} has no member named ‘max’
25 | if (trainers[big].max) {
| ^~~
sortingtrainers.cpp:31:24: error: ‘std::vector<bool>::reference’ {aka ‘struct std::_Bit_reference’} ha