提交时间:2022-10-04 11:28:23
运行 ID: 57482
#include<bits/stdc++.h> using namespace std; const int Mod=998244353; const int Maxn=1e5+5; int n,x,y; int f[Maxn]; int main() { //freopen("J3.in","r",stdin); //freopen("J3.out","w",stdout); cin>>n>>x>>y; for(int i=1;i<=x;i++) { if(i!=y && i<=n) f[i]=1; for(int j=1;j<=min(i/2,n);j++) { if(i-j==y || i-j>n) continue; f[i]=(f[i]+f[j])%Mod; } } cout<<f[x]<<'\n'; return 0; }