#include <bits/stdc++.h>
#include "books.h"
using namespace std;
using ll = long long;
constexpr ll INF = 1000000000000000000LL;
ll n, m, q, k, x, y, a, b, c;
map< pair< vector<int>, pair<int, int> >, ll > mp;
vector<int> perfect;
long long minimum_walk(vector<int> p, int s) {
ll num = 0;
bool fl = 1;
for (int i = 0; i < p.size(); i++) {
num += abs(i - p[i]);
if (i != p[i]) {
fl = 0;
}
if (fl) {
num += 2;
}
}
return num;
// for (int i = 0; i < p.size(); i++) {
// perfect.push_back(i);
// }
// deque< pair< vector<int>, pair<int, int> > > q;
// q.push_back({p, {s, -1}});
// mp[{p, {s, -1}}] = 0;
// while (!q.empty()) {
// auto [p, p2] = q[0];
// auto [s, carry] = p2;
// q.pop_front();
// // for (auto i : p) {
// // cout << i << ' ';
// // }
// // cout << endl;
// // cout << s << ' ' << carry << endl;
// if (p == perfect && s == 0 && carry == -1) {
// return mp[{p, {s, carry}}];
// }
// ll d = mp[{p, {s, carry}}];
// swap(carry, p[s]);
// if (!mp.count({p, {s, carry}})) {
// q.push_front({p, {s, carry}});
// mp[{p, {s, carry}}] = d;
// }
// swap(carry, p[s]);
// if (s > 0 && !mp.count({p, {s - 1, carry}})) {
// q.push_back({p, {s - 1, carry}});
// mp[{p, {s - 1, carry}}] = d + 1;
// }
// if (s < p.size() - 1 && !mp.count({p, {s + 1, carry}})) {
// q.push_back({p, {s + 1, carry}});
// mp[{p, {s + 1, carry}}] = d + 1;
// }
// }
}
Compilation message
simurgh.cpp:2:10: fatal error: books.h: No such file or directory
2 | #include "books.h"
| ^~~~~~~~~
compilation terminated.