A. Got Any Grapes?

签.

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 int x, y, z, a, b, c;
 5 bool solve()
 6 {
 7     if (a < x) return false;
 8     a -= x;
 9     b += a;
10     if (b < y) return false;
11     b -= y;
12     c += b;
13     if (c < z) return false;
14     return true;
15 }
16 
17 int main()
18 {
19     while (scanf("%d%d%d", &x, &y, &z) != EOF)
20     {
21         scanf("%d%d%d", &a, &b, &c);
22         puts(solve() ? "YES" : "NO");
23     }
24     return 0;
25 }
View Code

相关文章: