Codeforces Round #598 (Div. 3)
作者:互联网
A. Payment Without Change
签到。
Code
/*
* Author: heyuhhh
* Created Time: 2019/11/4 21:19:19
*/
#include <bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
#define Local
#ifdef Local
#define dbg(args...) do { cout << #args << " -> "; err(args); } while (0)
void err() { std::cout << '\n'; }
template<typename T, typename...Args>
void err(T a, Args...args) { std::cout << a << ' '; err(args...); }
#else
#define dbg(...)
#endif
void pt() {std::cout << '\n'; }
template<typename T, typename...Args>
void pt(T a, Args...args) {std::cout << a << ' '; pt(args...); }
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
int a, b, n, S;
void run(){
cin >> a >> b >> n >> S;
ll r = S - 1ll * a * n;
if(r <= 0) r = S % n;
if((ll)b >= r) pt("YES");
else pt("NO");
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cout << fixed << setprecision(20);
int T; cin >> T;
while(T--) run();
return 0;
}
标签:cout,pt,int,598,void,args,Codeforces,Div,define 来源: https://www.cnblogs.com/heyuhhh/p/11797516.html