标签:
#include <iostream> #include<cstdio> #include<algorithm> using namespace std; int a[5]; int i,ans; int cmp(int a,int b) { return a>b; } int main() { int t=0; while(~scanf("%d",&a[0])) { t++; for(i=1;i<=3;i++) scanf("%d",&a[i]); sort(a,a+4,cmp); //先排序 ans=a[0]+a[1]; printf("Case %d: %d\n",t,ans); // printf("**%d\n",0x7fffffff); } return 0; }
标签:
原文地址:http://www.cnblogs.com/stepping/p/5674096.html