A:阅读。

#include<iostream> 
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
char getc(){char c=getchar();while ((c<'A'||c>'Z')&&(c<'a'||c>'z')&&(c<'0'||c>'9')) c=getchar();return c;}
int gcd(int n,int m){return m==0?n:gcd(m,n%m);}
int read()
{
    int x=0,f=1;char c=getchar();
    while (c<'0'||c>'9') {if (c=='-') f=-1;c=getchar();}
    while (c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
    return x*f;
}
int a,b,c;
int main()
{
    a=read(),b=read(),c=read();
    cout<<b+min(c,a+b+1);
    return 0;
}
View Code

相关文章:

  • 2021-11-21
  • 2022-01-18
  • 2022-03-01
  • 2022-01-06
  • 2022-02-05
  • 2022-02-20
  • 2021-10-31
猜你喜欢
  • 2021-06-24
  • 2021-12-20
  • 2021-09-28
  • 2021-10-17
  • 2021-08-14
  • 2021-05-30
相关资源
相似解决方案