A: 做游戏(签到题)

2020牛客寒假算法基础集训营2

传送门

题意:

在这里插入图片描述

坑点:

用long long

代码:

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <math.h>
#include <map>
#include <queue>
#include <set>
#define Pll make_pair
using namespace std;
typedef long long ll;
const int maxn=2e5+50;
const int inf=0x3f3f3f3f;
const int mod=1e9+7;
const int phi=1e9+6;
int p[maxn];
int main()
{
    ll a,b,c,x,y,z;
    scanf("%lld%lld%lld%lld%lld%lld",&a,&b,&c,&x,&y,&z);
    ll ans=0;
    ans+=min(a,y)+min(b,z)+min(c,x);
    printf("%lld\n",ans);
    return 0;
}
发布了142 篇原创文章 · 获赞 13 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_44091178/article/details/104202512