#include #include #include #include #include using namespace std; class State { public: vector> stacks; int w, h, size; vector heights; pair req; State(); State(const vector>& _stacks, pair _req); State copy() const; bool operator==(const State& other) const; struct HashFunction; bool add(int i, int v); void pop(int i); void sort_stacks(); void print() const; };