books.cpp: In function 'bool valid(std::vector<int>)':
books.cpp:14:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for (int i = 1; i < v.size(); i++){
| ~~^~~~~~~~~~
books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:25:15: error: 'class std::deque<std::pair<std::pair<int, int>, std::pair<int, std::vector<int> > > >' has no member named 'top'
25 | int i = bfs.top().first.first, t = bfs.top().first.second, b = bfs.top().second.first; vector<int> v = bfs.top().second.second; bfs.pop();
| ^~~
books.cpp:25:110: error: 'class std::deque<std::pair<std::pair<int, int>, std::pair<int, std::vector<int> > > >' has no member named 'top'
25 | int i = bfs.top().first.first, t = bfs.top().first.second, b = bfs.top().second.first; vector<int> v = bfs.top().second.second; bfs.pop();
| ^~~
books.cpp:25:135: error: 'class std::deque<std::pair<std::pair<int, int>, std::pair<int, std::vector<int> > > >' has no member named 'pop'
25 | int i = bfs.top().first.first, t = bfs.top().first.second, b = bfs.top().second.first; vector<int> v = bfs.top().second.second; bfs.pop();
| ^~~
books.cpp:26:34: error: 't' was not declared in this scope
26 | if (i == 0 && valid(v)) return t;
| ^
books.cpp:27:53: error: 't' was not declared in this scope
27 | if (i > 0) bfs.push_back(make_pair(make_pair(i-1, t+1), make_pair(b, v)));
| ^
books.cpp:27:69: error: 'b' was not declared in this scope
27 | if (i > 0) bfs.push_back(make_pair(make_pair(i-1, t+1), make_pair(b, v)));
| ^
books.cpp:28:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(b, v)));
| ~~^~~~~~~~~~~~
books.cpp:28:62: error: 't' was not declared in this scope
28 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(b, v)));
| ^
books.cpp:28:78: error: 'b' was not declared in this scope
28 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(b, v)));
| ^
books.cpp:30:32: error: 'b' was not declared in this scope
30 | vector<int> nv = v; nv[i] = b;
| ^
books.cpp:31:36: error: 't' was not declared in this scope
31 | if (i == 0 && valid(nv)) return t;
| ^
books.cpp:32:54: error: 't' was not declared in this scope
32 | if (i > 0) bfs.push_back(make_pair(make_pair(i-1, t+1), make_pair(-1, nv)));
| ^
books.cpp:33:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(-1, nv)));
| ~~^~~~~~~~~~~~
books.cpp:33:63: error: 't' was not declared in this scope
33 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(-1, nv)));
| ^
books.cpp:35:8: error: 'b' was not declared in this scope
35 | if (b == -1){
| ^
books.cpp:37:55: error: 't' was not declared in this scope
37 | if (i > 0) bfs.push_back(make_pair(make_pair(i-1, t+1), make_pair(temp, nv)));
| ^
books.cpp:38:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(temp, nv)));
| ~~^~~~~~~~~~~~
books.cpp:38:64: error: 't' was not declared in this scope
38 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(temp, nv)));
| ^
books.cpp:41:55: error: 't' was not declared in this scope
41 | if (i > 0) bfs.push_back(make_pair(make_pair(i-1, t+1), make_pair(temp, nv)));
| ^
books.cpp:42:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(temp, nv)));
| ~~^~~~~~~~~~~~
books.cpp:42:64: error: 't' was not declared in this scope
42 | if (i < v.size()-1) bfs.push_back(make_pair(make_pair(i+1, t+1), make_pair(temp, nv)));
| ^