1711:集训题单

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:2 解决:2

题目描述

小爱老师正在准备本次信息学集训的选题,为此他已经准备了 lns="http://www.w3.org/1998/Math/MathML"> 道备选试题,每题都有一个难度值,其中第 lns="http://www.w3.org/1998/Math/MathML"> 道题的难度值为 lns="http://www.w3.org/1998/Math/MathML"> 。

由于集训时长的限制,小爱准备从这些备选试题中选出 lns="http://www.w3.org/1998/Math/MathML"> 道试题组成正式的集训题单。为了保证集训的质量及难度,选出的 lns="http://www.w3.org/1998/Math/MathML"> 道试题中需保证至少有 lns="http://www.w3.org/1998/Math/MathML"> 道试题的难度不低于给定的难度值 lns="http://www.w3.org/1998/Math/MathML">

请你帮助小爱计算一下,一共有多少种不同的选题方式?由于答案可能很大,请输出最终方案数 lns="http://www.w3.org/1998/Math/MathML">998244353 即可。
(注意:选出相同的试题但前后顺序不同,均认为是同一种选法。)

输入

输入共三行:
输入第一行,两个正整数 lns="http://www.w3.org/1998/Math/MathML">,
输入第二行,lns="http://www.w3.org/1998/Math/MathML"> 个正整数,分别表示 lns="http://www.w3.org/1998/Math/MathML">1,2,...,
输入第三行,两个正整数 lns="http://www.w3.org/1998/Math/MathML">,

lns="http://www.w3.org/1998/Math/MathML">1 ,lns="http://www.w3.org/1998/Math/MathML">1,109

输出

输出满足条件的方案数对 lns="http://www.w3.org/1998/Math/MathML">998244353 取模后的结果

样例输入-1 复制

3 2
10 20 30
1 20

样例输出-1 复制

3