题解 | #排队领水#
排队领水
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;
}