fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7. int t,c,d,l;
  8. cin>>t;
  9.  
  10. while(t>0)
  11. {
  12. cin>>c;
  13. cin>>d;
  14. cin>>l;
  15.  
  16. if(l%4==0 && ((l==4*d && c<=2*d) || (l>4*d && c<=2*d && l<=4*(c+d)) || (l>4*d && c>2*d && (l-4*d)/4>=c-2*d && l<=4*(c+d))));
  17. cout<<"yes"<<endl;
  18. else
  19. cout<<"no"<<endl;
  20.  
  21. //TODO
  22.  
  23. t--;
  24. }
  25.  
  26. return 0;
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:18:2: error: 'else' without a previous 'if'
  else
  ^
stdout
Standard output is empty