题解 | #排队领水#

排队领水

https://ac.nowcoder.com/acm/problem/22240

再做一遍

using namespace std;
#define int long long
#define endl '\n'
signed main(){
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int n,a,b;cin>>n>>a>>b;
    if(n-a>b+1)cout<<b+1<<endl;//取小的
    else cout<<n-a<<endl;
    return 0;
}
全部评论

相关推荐

爱读书的小章鱼很爱吃:如果是算法工程师岗位,感觉没必要做agent项目吧,agent偏ai应用
投了多少份简历才上岸
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务