Skip to content

Instantly share code, notes, and snippets.

@ravikiran0606
Created July 27, 2016 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravikiran0606/6392a38d09a20e0302e76a85e296bd5d to your computer and use it in GitHub Desktop.
Save ravikiran0606/6392a38d09a20e0302e76a85e296bd5d to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long int t;
unsigned long long a,b,c,d,e,temp;
cin>>t;
while(t--){
cin>>a>>b>>c>>d>>e;
temp=a+b+c+d;
if(temp<=e)
cout<<"YES\n";
else
cout<<"NO\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment