https://www.acmicpc.net/problem/16917
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int a,b,c,x,y;
cin >>a>>b>>c>>x>>y;
int num1=a*x+b*y;
int k=x>=y?x:y;
int num2=k*2*c;
int min1=min(num1,num2);
int w=(a+b)>=2*c?2*c:a+b;
int v=x>=y?y:x;
x-=v;
y-=v;
int num3=v*w+x*a+y*b;
min1=min(min1,num3);
cout<<min1;
}