提交时间:2022-10-04 11:29:22

运行 ID: 57489

#include <bits/stdc++.h> using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') f=-1; for(;ch>='0'&&ch<='9';ch=getchar()) x=(x<<3)+(x<<1)+(ch^48); return x*f; } inline int min(int x,int y){ return x>y?y:x; } int n,x,y,f[100005],minnx; int main(){ // freopen("J3.in","r",stdin); // freopen("J3.out","w",stdout); n=read(),x=read(),y=read(),f[0]=1,minnx=min(n,x); for(register int i=1;i<=minnx;i++) if(i^y) for(register int j=min(x,(i<<1));j>=i;j--) (f[j]+=f[j-i]+((i<<1)==j))%=998244353; printf("%d\n",f[x]); return 0; }