本文主要是介绍HDU Keep on Truckin',希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1037
本题英文阅读理解题目。
#include<stdio.h>
#include<string.h>
#include<algorithm>
//#define LOCAL
using namespace std;
int main(){#ifdef LOCALfreopen("input.txt","r",stdin);#endif // LOCALint height[3];memset(height,0,sizeof(height));const int truck_height=168;int a,b,c;while(scanf("%d %d %d",&a,&b,&c)!=EOF){height[0]=a,height[1]=b;height[2]=c;sort(height,height+3);int crash=0;for(int i=0;i<3;i++){if(height[i]<truck_height){printf("CRASH %d\n",height[i]);crash=1;break;}}if(crash==0)printf("NO CRASH\n");}return 0;
}
这篇关于HDU Keep on Truckin'的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!