#include<stdio.h> int main(){ __int64 h,a,b,k,j=0; while(scanf("%I64d%I64d%I64d%I64d",&h,&a,&b,&k),h||a||b||k) { printf("Case #%I64d: ",++j); if(h<a+1) { printf("YES\n"); continue; } if(a<=b) { printf("NO\n"); continue; } if((a-b)*k-b>0) { printf("YES\n"); continue; } if(h-(a-b)*(k-1)-a<1) { printf("YES\n"); continue; } printf("NO\n"); } return 0; }
hdu 4950
时间: 2024-10-05 04:33:19