当前位置: 代码迷 >> 综合 >> ACM赛 CF gym 101341 C Urn with Balls
  详细解决方案

ACM赛 CF gym 101341 C Urn with Balls

热度:41   发布时间:2023-12-06 08:16:40.0

题目: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_pairusing 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;
}