#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int K = 1010, N = 25, M = 85;
int f[N][M];
int main()
{
memset(f, 0x3f, sizeof f);
f[0][0] = 0;
int k;
int vo, vn;
cin >> vo >> vn;
cin >> k;
for (int i = 0; i < k; i ++){
int o, n, w;
scanf("%d%d%d", &o, &n, &w);
for (int jo = vo; jo >= 0; jo --)
for (int jn = vn; jn >= 0; jn --)
f[jo][jn] = min(f[jo][jn], f[max(0, jo - o)][max(0, jn - n)] + w);
}
cout << f[vo][vn] << endl;
return 0;
}
大佬图是用什么软件画的啊?
win10自带的oneNote😁
okkkkk
什么画板啊