BZOJ3856 Monster

2015.01.07 08:22 Wed| 0 visits oi_2015| 2015_刷题日常| Text

Solution

做完这题,我只想说:什么鬼?!

简单的要命,不造为毛用 cout 输出就 WA 到爽 = =

Code

#include <bits/stdc++.h>
using namespace std;

long long h, a, b, k, cnt;

int main()
{
    while(cin >> h >> a >> b >> k, h||a||b||k)
    {
        printf("Case #%d: ", ++cnt);
        if(a >= h || a*k > b*(k+1) || a*k-b*(k-1) >= h)
            puts("YES");
        else puts("NO");
    }
    return 0;
}