Keep on Truckin '
Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 9881 Accepted Submission (s): 6859
Problem Descriptionboudreaux and Thibodeaux is on the road again ...
"Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by tonight!"
"Don ' t worry, Thibodeaux, I already checked ahead. There is three underpasses and our 18-wheeler would fit through all of the them, so just keep this motor running! "
"We ' re not going-make it, I say!"
So, which was it:will there be a very messy accident on interstate, or was Thibodeaux just letting the sound of his own Wheels drive him crazy?
Inputinput to this problem would consist of a single data set. The data set is formatted according to the following description.
The data set would consist of a containing 3 numbers, separated by single spaces. Each number represents the height of a and underpass in inches. Each number would be between 0 and inclusive.
Outputthere'll is exactly one line of output. This line would be:
NO CRASH
If the height of the 18-wheeler is less than the height of each of the underpasses, or:
CRASH X
Otherwise, where X is the height of the first underpass in the data set, the 18-wheeler are unable to go under (which M EANs its height was less than or equal to the height of the 18-wheeler).
The height of the 18-wheeler is 168 inches.
Sample Input
180 160 170
Sample Output
CRASH 160
Sourcesouth Central USA 2003
The big night bully me IQ! The damn egg.
#include <iostream>int main () {using namespace Std;int n,m,k;while (cin>>n>>m>>k) {if (n<= 168) cout<< "CRASH" <<n<<endl;if (m<=168) cout<< "CRASH" <<m<<endl;if (k<= 168) cout<< "CRASH" <<k<<endl;if (n>168&&m>168&&k>168) cout<< "NO CRASH" <<ENDL;} return 0;}
Hangzhou Electric HDU 1037 Keep on Truckin '