CF577B Modulo Sum

题目描述

# 题面描述 给出 $1$ 个长度为 $n$ 的序列,以及 $1$ 个正整数 $m$。问这个原序列中是否存在非空子序列,使其元素之和能被 $m$ 整除。

输入格式

输出格式

说明/提示

In the first sample test you can choose numbers $ 2 $ and $ 3 $ , the sum of which is divisible by $ 5 $ . In the second sample test the single non-empty subsequence of numbers is a single number $ 5 $ . Number $ 5 $ is not divisible by $ 6 $ , that is, the sought subsequence doesn't exist. In the third sample test you need to choose two numbers $ 3 $ on the ends. In the fourth sample test you can take the whole subsequence.