Hangzhou Electric HDU 1037 Keep on Truckin '

Source: Internet
Author: User

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 '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.