题解:P15055 [UOI 2023 II Stage] Gallery

· · 题解

2 个花瓶的情况一共有 3 种:a+ba+cb+c。取 3 种情况的最大值即可。

#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
    cin>>a>>b>>c;
    cout<<max(a+b,max(a+c,b+c));
    return 0;
}