Untitled

 avatar
unknown
plain_text
3 years ago
363 B
3
Indexable
#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";

}
Editor is loading...