MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / solve

Function solve

CSES/DP/BookShop_MEMO.cpp:40–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void solve() {
41 int n, x; cin >> n >> x;
42 vector<ll> cost(n); cin >> cost;
43 vector<ll> weight(n); cin >> weight;
44 vector<vector<ll>> dp(n+1,vector<ll> (x+1,-1));
45 cout << f(n-1,x,cost,weight,dp) << '\n';
46}
47
48signed main() {
49 ios_base::sync_with_stdio(false),cin.tie(nullptr);

Callers 1

mainFunction · 0.70

Calls 1

fFunction · 0.70

Tested by

no test coverage detected