## 2294: Tigerzhou的神奇序列

### 题目描述

Give an array a with a length of n. If the sum in a subsequence is a multiple of M, then this sequence is called a "M sequence." Now you want to find the length of the longest subsequence for array a, which is the M sequence.

### 输入

The first behavior is two integers n, M, separated by spaces, and the second behavior is n integers, indicating$a[1] ∼ a[n]$, $(1 \leq n \leq 10^5)$, $(1 \leq a[i] \leq 10^9 , 1 \leq n,M \leq 10^7)$

### 输出

Output an integer to indicate the length of the longest subsequence $k$

### 样例输入

7 5
10 3 4 2 2 9 8

### 样例输出

6

### 提交代码

© 2019 JustOJ     中文  English  | l.jiang.1024@gmail.com | Docs | System Info | Telegram Group | Telegram Channel