Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

sebi and the highway

$
0
0

include <iostream>

using namespace std; int main() { int a ;cin>>a; while(a--) { long double speed , sg ,fg , d, t ; cin>>speed>>sg>>fg>>d>>t; long double x = speed (t/3600); long double v= (x+ ((50d)/1000)) / (t/3600); long double j=2; long double q=0,h=0; if(fg==sg) cout<<"DRAW"<<endl; else="" if="" (fg="">sg) { q=(fg+sg)/j; if(v>q) cout<<"FATHER"<<endl; else="" if="" (v="=q)" cout<<"draw"<<endl;="" else="" cout<<"sebi"<<endl;="" }="" else="" if="" (sg="">fg) { h=(sg+fg)/j ; if(v>h) cout<<"SEBI"<<endl; else if (v==h) cout<<"DRAW"<<endl; else cout<<"FATHER"<<endl; }

}

}


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>