dzumbus.cpp: In function 'std::vector<long long int> add(std::vector<long long int>&, std::vector<long long int>&)':
dzumbus.cpp:18:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | for (int i = 0; i < A.size(); i++) {
| ~~^~~~~~~~~~
dzumbus.cpp:19:21: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | for (int j = 0; j < B.size(); j++)
| ~~^~~~~~~~~~
dzumbus.cpp: In function 'std::vector<long long int> minimize(std::vector<long long int>, std::vector<long long int>&)':
dzumbus.cpp:28:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | for (int i = 0; i < B.size(); i++)
| ~~^~~~~~~~~~
dzumbus.cpp: In function 'void dfs(long long int, long long int)':
dzumbus.cpp:42:42: error: cannot bind non-const lvalue reference of type 'std::vector<long long int>&' to an rvalue of type 'std::vector<long long int>'
42 | dp[node][0] = add(dp[node][0], minimize(dp[u][0], dp[u][2]));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
dzumbus.cpp:16:46: note: initializing argument 2 of 'std::vector<long long int> add(std::vector<long long int>&, std::vector<long long int>&)'
16 | vector<int> add(vector<int> &A, vector<int> &B) {
| ~~~~~~~~~~~~~^
dzumbus.cpp:44:51: error: cannot bind non-const lvalue reference of type 'std::vector<long long int>&' to an rvalue of type 'std::vector<long long int>'
44 | dp[node][2] = minimize(add(dp[node][1], minimize(dp[u][1], dp[u][2])),
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
dzumbus.cpp:16:46: note: initializing argument 2 of 'std::vector<long long int> add(std::vector<long long int>&, std::vector<long long int>&)'
16 | vector<int> add(vector<int> &A, vector<int> &B) {
| ~~~~~~~~~~~~~^
dzumbus.cpp:45:52: error: cannot bind non-const lvalue reference of type 'std::vector<long long int>&' to an rvalue of type 'std::vector<long long int>'
45 | add(dp[node][2], minimize(dp[u][1], minimize(dp[u][2], dp[u][0]))));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
dzumbus.cpp:25:50: note: initializing argument 2 of 'std::vector<long long int> minimize(std::vector<long long int>, std::vector<long long int>&)'
25 | vector<int> minimize(vector<int> A, vector<int> &B) {
| ~~~~~~~~~~~~~^
dzumbus.cpp: In function 'int main()':
dzumbus.cpp:68:27: error: cannot bind non-const lvalue reference of type 'std::vector<long long int>&' to an rvalue of type 'std::vector<long long int>'
68 | res = add(res, minimize(dp[i][0], dp[i][2]));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
dzumbus.cpp:16:46: note: initializing argument 2 of 'std::vector<long long int> add(std::vector<long long int>&, std::vector<long long int>&)'
16 | vector<int> add(vector<int> &A, vector<int> &B) {
| ~~~~~~~~~~~~~^