#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,D,K; cin >> N >> D >> K; vector A(N),C(N); for(auto &a : A) cin >> a; for(auto &c : C) cin >> c; vector> dp(D+1,vector(K+1,-1e18)); dp.at(0).at(0) = 0; for(int i=0; i=0; k--) for(int l=0; l<=K; l++){ dp.at(k+1).at(min(K,l+c)) = max(dp.at(k+1).at(min(K,l+c)),dp.at(k).at(l)+a); } } if(dp.at(D).at(K) <= -1e17) cout << "No" << endl; else cout << dp.at(D).at(K) << endl; }