https://www.acmicpc.net/problem/24313
#include <iostream>
#define fn(a1, a0, n) a1 *n + a0
#define gn(n) n
using namespace std;
int main()
{
int a1, a0, n, c;
cin >> a1 >> a0;
cin >> n;
cin >> c;
if (fn(a1, a0, n) <= c * gn(n) && a1 <= c)
cout << 1;
else
cout << 0;
return 0;
}