molecules.cpp: In function 'int myrand(int, int)':
molecules.cpp:17:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(ret < 0) ret = -ret; ret %= (r-l+1); ret += l;
^~
molecules.cpp:17:26: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(ret < 0) ret = -ret; ret %= (r-l+1); ret += l;
^~~
molecules.cpp: In function 'int get(int, int)':
molecules.cpp:40:11: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference {aka std::_Bit_reference}' and 'int')
if(vis[i][v]) return dp[i][v];
^
molecules.cpp:40:28: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference {aka std::_Bit_reference}' and 'int')
if(vis[i][v]) return dp[i][v];
^
molecules.cpp:41:8: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference {aka std::_Bit_reference}' and 'int')
vis[i][v] = 1;
^
molecules.cpp:42:7: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference {aka std::_Bit_reference}' and 'int')
dp[i][v] = get(i + 1, v) | get(i + 1, v + a[i]);
^
molecules.cpp:43:14: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference {aka std::_Bit_reference}' and 'int')
return dp[i][v];
^
molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:60:36: error: no matching function for call to 'std::vector<bool>::assign(const int&, std::vector<bool>)'
dp.assign(maxn, vector<bool>(maxn));
^
In file included from /usr/include/c++/7/vector:65:0,
from molecules.h:3,
from molecules.cpp:4:
/usr/include/c++/7/bits/stl_bvector.h:755:5: note: candidate: void std::vector<bool, _Alloc>::assign(std::vector<bool, _Alloc>::size_type, const bool&) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::size_type = long unsigned int]
assign(size_type __n, const bool& __x)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:755:5: note: no known conversion for argument 2 from 'std::vector<bool>' to 'const bool&'
/usr/include/c++/7/bits/stl_bvector.h:762:7: note: candidate: template<class _InputIterator, class> void std::vector<bool, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Alloc = std::allocator<bool>]
assign(_InputIterator __first, _InputIterator __last)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:762:7: note: template argument deduction/substitution failed:
molecules.cpp:60:36: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<bool>')
dp.assign(maxn, vector<bool>(maxn));
^
In file included from /usr/include/c++/7/vector:65:0,
from molecules.h:3,
from molecules.cpp:4:
/usr/include/c++/7/bits/stl_bvector.h:776:5: note: candidate: void std::vector<bool, _Alloc>::assign(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]
assign(initializer_list<bool> __l)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:776:5: note: candidate expects 1 argument, 2 provided
molecules.cpp:61:37: error: no matching function for call to 'std::vector<bool>::assign(const int&, std::vector<bool>)'
vis.assign(maxn, vector<bool>(maxn));
^
In file included from /usr/include/c++/7/vector:65:0,
from molecules.h:3,
from molecules.cpp:4:
/usr/include/c++/7/bits/stl_bvector.h:755:5: note: candidate: void std::vector<bool, _Alloc>::assign(std::vector<bool, _Alloc>::size_type, const bool&) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::size_type = long unsigned int]
assign(size_type __n, const bool& __x)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:755:5: note: no known conversion for argument 2 from 'std::vector<bool>' to 'const bool&'
/usr/include/c++/7/bits/stl_bvector.h:762:7: note: candidate: template<class _InputIterator, class> void std::vector<bool, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Alloc = std::allocator<bool>]
assign(_InputIterator __first, _InputIterator __last)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:762:7: note: template argument deduction/substitution failed:
molecules.cpp:61:37: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<bool>')
vis.assign(maxn, vector<bool>(maxn));
^
In file included from /usr/include/c++/7/vector:65:0,
from molecules.h:3,
from molecules.cpp:4:
/usr/include/c++/7/bits/stl_bvector.h:776:5: note: candidate: void std::vector<bool, _Alloc>::assign(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]
assign(initializer_list<bool> __l)
^~~~~~
/usr/include/c++/7/bits/stl_bvector.h:776:5: note: candidate expects 1 argument, 2 provided