提交时间:2022-10-04 11:24:57
运行 ID: 57448
#include<bits/stdc++.h> using namespace std; const long long mod=998244353; int x,y,n; long long f[100005]; int main(){ // freopen("J3.in","r",stdin); // freopen("J3.out","w",stdout); scanf("%d%d%d",&n,&x,&y); for(int i=1;i<=n;i++) f[i]=1; f[y]=0; for(int i=1;i<=x;i++) for(int j=1;j<=min(i,n);j++) if(y!=j&&j>=(i-j)) f[i]=(f[i]+f[i-j])%mod; printf("%lld\n",f[x]); return 0; }