#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using pall = pair; using vell = vector; template constexpr bool mini(T &var, const U &val) noexcept { const bool cmp = var > val; if(cmp) var = val; return cmp; } template constexpr bool maxi(T &var, const U &val) noexcept { const bool cmp = var < val; if(cmp) var = val; return cmp; } void solve(); int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; } void solve() { ll n, d, K; cin >> n >> d >> K; vell a(n), c(n); for(auto &e:a) cin >> e; for(auto &e:c) cin >> e; // dp[i][j] = i個, jē¾Žć—ć•. vector dp(d + 1, vell(K + 1, -1e18)); dp[0][0] = 0; for(intmax_t i=0;i