Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces 448A
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, a, asum=0, b, bsum=0, s=0;
- for(int i=0;i<3;i++)
- {
- cin >> a;
- asum+=a;
- }
- for(int i=0;i<3;i++)
- {
- cin >> b;
- bsum+=b;
- }
- cin >> n;
- while(asum>0)
- {
- asum-=5;
- s++;
- }
- while(bsum>0)
- {
- bsum-=10;
- s++;
- }
- if(s<=n){cout << "YES";}
- else{cout << "NO";}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement