您的位置:首页 > 其它

hdu 4950 Monster

2014-08-16 14:35 288 查看
回顾一下第八场的多校,先发两道水题
//0MS	320K
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;
typedef long long LL;

int main(){
LL h, a, b, k;
int kase = 1;
while(~scanf("%I64d%I64d%I64d%I64d", &h, &a, &b, &k)){
if(h==0 && a==0 && b==0 && k==0) break;
printf("Case #%d: ", kase++);
if(h - a < 1){ //一击秒杀
printf("YES\n");
continue;
}
else if(a*k - b*(k-1) >= h){ //在第一轮的第k回合攻击后杀死
printf("YES\n");
continue;
}
else if(a*k - b*(k+1) > 0){ //第一轮的第k+1回合后野怪掉血
printf("YES\n");
continue;
}
else printf("NO\n");
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: