ACM赛 CF gym 101341 C Urn with Balls

题目:Urn with Balls

思路:
emm…瞎搞分类讨论推结论

代码:

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <map> // STL
#include <string> 
#include <vector>
#include <queue>
#include <stack>
#define mpr make_pair

using namespace std;

typedef long long LL;

const int inf = 1 << 30;

LL a,b,c;
LL n,m;

int main(){
    cin>>a>>b>>c>>n>>m;
    LL s=(a+b+c);
    if((a+c)>n)s=n;
    if((b+c)>m)s=min(s,m);
    cout<<s<<endl;

    return 0;
}

猜你喜欢

转载自blog.csdn.net/rabbit_ZAR/article/details/81366557
今日推荐