#include using namespace std; #define int long long templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> s >> d; memset(memo, -1, sizeof(memo)); cout << dp(0, 0, true) << endl; return 0; }