Codeforces Round #278 (Div. 2) C. Fight the Monster 二分+枚举
二分所需的花费,对给定花费枚举hp、atk、def的购买数量。代码如下#include
usingnamespacestd;
#defineINF30100
#definemax(a,b)(a)>(b)?(a):(b)
inthp[2],atk[2],def[2];
inth,a,d;
boolcheck(intx){
intbound_hp=x/h,rest=x;
boolfound=fals