一开始没有使用正解的dp,dp是i气力造成的最大伤害。所以我从0正向dp,f[i] >= hp时及得最小气力,but 不知道哪有问题,只能过16%有没有大佬帮忙看一看 #include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define fo(i, n) for (int i = 1; i <= n; ++i) #define rep(i, k, n) for (int i = k; i <= n; ++...