Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
363 B
0
Indexable
Never
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {
	float a, b, c, q, n, A, B, C, d = 0, e = 0, f = 0;
	cin >> a >> b >> c;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> A >> B >> C >> q;
		d += A * q;
		e += B * q;
		f += C * q;
	}
	if (d >= a && e >= b && f >= c) cout << "YES";
	else cout << "NO";

}