A - Drazil and Date (515A - Drazil and Date)


  1. 515A - Drazil and Date
  2. #include<iostream>
  3. using namespace std;
  4. #define yes "Yes";
  5. #define no "No";
  6. int main(){
  7. long a ,b,s;
  8. cin>>a>>b>>s;
  9. if(abs(a)+abs(b)== s) {cout<<yes;}
  10. else if(s> abs(a)+ abs(b)){
  11. long r;
  12. r= s-(abs(a)+abs(b)) ;
  13.  
  14. //cout<<r<<endl;
  15. if(r%2==0) {cout<<yes;}
  16. else cout<<"No";
  17. }
  18. else cout<<"No";

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

Aptitude test assistant programmer 2018

1041A. Heist solution