题解:P15055 [UOI 2023 II Stage] Gallery
题解:P15055 [UOI 2023 II Stage] Gallery
思路
显然,应该选择高度第一大和第二大的花瓶,这样花瓶组合就是最高的。
不过因为只有
完整代码
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int a,b,c;
cin>>a>>b>>c;
cout<<a+b+c-min(a,min(b,c));
return 0;
}