B. 裂开吧,我累了

    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.

Description

现在给你一个由n个数组成的数组(a1,a2,a3......),再给你一个数k,现在要求你从数组中选择k个数,要求他的和为素数,请问有多少个方案。

Format

Input

第一行两个空格隔开的整数 n,k(n<20;k<n); 第二行由n个数组成的数组。

Output

输出符合要求方案的个数

Samples

4 3
3 7 12 19
1

Limitation

1s, 1024KiB for each test case.

2022-2023学年周赛(10)暨蓝桥杯训练赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2023-3-5 8:30
End at
2023-3-5 12:00
Duration
3.5 hour(s)
Host
Partic.
32