cf/mirror

Factorial Divisibility

CF
1753B1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 5
Input
6 4
3 2 2 2 3 3
Output
Yes
Sample 2of 5
Input
8 3
3 2 2 2 2 2 1 1
Output
Yes
Sample 3of 5
Input
7 8
7 7 7 7 7 7 7
Output
No
Sample 4of 5
Input
10 5
4 3 2 1 4 3 2 4 3 4
Output
No
Sample 5of 5
Input
2 500000
499999 499999
Output
No
1753B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)