其实这个题就是考虑 某一炉烧烤的始末时间可能会跨越第二个炉形成的时间,
那么就要考虑 是烤完这一炉再用新炉还是不烤等新炉好了再用,,
我是分情况讨论的,看了拖爷的代码感觉神奇的不行
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <ctype.h>
#include <vector>
#include <algorithm>
// cout << " === " << endl;
using namespace std;
typedef long long ll;
const int maxn = 200 + 7, INF = 0x3f3f3f3f, mod = 1e9+7;
int n, t, k, d;
int main() {
scanf("%d %d %d %d", &n, &t, &k, &d);
int cnt = n / k;
if(n % k != 0) cnt++;
int ans1 = cnt * t;
int tt = 0;
int n1 = d / t;
int n2 = d / t + (d % t == 0 ? 0 : 1);
int ans2 = ((cnt-n1) / 2 + ((cnt-n1) % 2 == 1 ? 1 : 0)) * t +d;
int ans3 = n2 * t + ((cnt-n2) / 2 + ((cnt-n2) % 2 == 1 ? 1 : 0)) * t;
if(ans2 < ans1 || ans3 < ans1) puts("YES");
else puts("NO");
return 0;
}