TopCoder

User's AC Ratio

100.0% (2/2)

Submission's AC Ratio

60.0% (3/5)

Tags

Description

給定一個長度為 N 的序列 A 以及一個正整數 KN ,令

S={Ai1Ai2AiK1i1<i2<<iKN}

其中 為 bitwise-and ,在 C++ 中可以用 & 來實現。請求出 S 的大小。

Input Format

輸入第一行有兩個正整數 NK,意義如題目所敘。

接著一行有 N 個整數,第 i 個為 Ai

  • 1KN106
  • 0Ai106

Output Format

輸出一個整數,代表 S 的大小。

Sample Input 1

10 5
8 10 14 19 11 13 5 19 4 10

Sample Output 1

4

Hints

Problem Source

IOICamp 2020 Day3 pK

Subtasks

No. Testdata Range Constraints Score
1 0 範例測資 0
2 0~35 無額外限制 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 5000 262144 65536 1 2
1 5000 262144 65536 2
2 5000 262144 65536 2
3 5000 262144 65536 2
4 5000 262144 65536 2
5 5000 262144 65536 2
6 5000 262144 65536 2
7 5000 262144 65536 2
8 5000 262144 65536 2
9 5000 262144 65536 2
10 5000 262144 65536 2
11 5000 262144 65536 2
12 5000 262144 65536 2
13 5000 262144 65536 2
14 5000 262144 65536 2
15 5000 262144 65536 2
16 5000 262144 65536 2
17 5000 262144 65536 2
18 5000 262144 65536 2
19 5000 262144 65536 2
20 5000 262144 65536 2
21 5000 262144 65536 2
22 5000 262144 65536 2
23 5000 262144 65536 2
24 5000 262144 65536 2
25 5000 262144 65536 2
26 5000 262144 65536 2
27 5000 262144 65536 2
28 5000 262144 65536 2
29 5000 262144 65536 2
30 5000 262144 65536 2
31 5000 262144 65536 2
32 5000 262144 65536 2
33 5000 262144 65536 2
34 5000 262144 65536 2
35 5000 262144 65536 2