hdu4247水题
挺水的,边长肯定是最大的箱子的边长加上次大的箱子的边长
/* * hdu1003/win.cpp * Created on: 2012-7-24 * Author : ben */ #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <queue> #include <set> #include <map> #include <stack> #include <string> #include <vector> #include <deque> #include <list> #include <functional> #include <numeric> #include <cctype> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("data.in", "r", stdin); #endif int T = 0; int a[4]; while(scanf("%d%d%d%d", &a[0], &a[1], &a[2], &a[3]) == 4) { sort(a, a + 4); printf("Case %d: %d\n", ++T, a[2] + a[3]); } return 0; }