Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
horse aand goat working
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ unsigned int h,g,l,N,h1=0,g1=0,min=0,max=0; cin>>g>>h>>N; h1=h*2; if(g>h1) { g1=g-h1; } min=h*4+g1*4; max=h*4+g*4; cout<<max<<" "<<min<<endl; if((N<=max && N>=min) && N%4==0 ) { cout<<"yes"; } else cout<<"no"; if(t>0) { cout<<endl; } } cout<<endl; return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
4149 coj TL
Shorting in one line using class members std and boost bind
fastest input taking for large files
variadic template
HeapSort
Cross Multiplication
on_off
CPP - Arrays - Ex.2
Left view of a tree
ulib
stackse - search stackoverflow differently
Please log in to post a comment.