#D. 高中数学题

    Type: Default 1000ms 256MiB

高中数学题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

这是一道数学题!!!!!嘿嘿

Description

给你一组数列a1,a2,a3......an和一个数x。a1!+a2!.....+an!(数列每个数的阶乘之和)。使得阶乘之和可以整除x的阶乘;

(千万别被数据卡了qwq)

Input

第一行输入n(数列个数)和x;1≤n≤500000 , 1≤x≤500000) 第二行输入n个数;(ai<x)

Output

如果可以整除输出“Yes”,否则输出“No”;(无换行)

Samples

6 4
3 2 2 2 3 3
Yes

#列如第一个样例:3!+2!+2!+2!+3!+3!=6+2+2+2+6+6=24. 4!=24;可以整除。

Limitation

1s, 1024KiB for each test case.

新生周赛第四场(DIV. 3)

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2022-10-24 20:00
End at
2022-10-24 21:42
Duration
1.7 hour(s)
Host
Partic.
38