#Lutece1294. 天行廖的游戏
天行廖的游戏
Migrated from Lutece 1294 天行廖的游戏
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
天行健,君子以自强不息。地势坤,廖爷以厚德载物
一日在喵哈哈村,天行廖和沈宝宝正在玩一个游戏。
天行廖分别在个纸片上写上一个数字,并放到一个盒子中。
现在沈宝宝要从盒子中抓出任意张纸片。
如果沈宝宝抓出的纸片上的数字,,....满足 & & .... ( ),那么天行廖赢得这次游戏的胜利,否则沈宝宝赢。
Input
第一行输入个整数()
第二行输入个整数。()
Output
输出获胜的方案数量。因为结果可能很大,输出答案对取模的结果即可。
Samples
3
2 3 3
0
4
0 1 2 3
10
6
5 2 0 5 2 1
53
2
0 0
3
Note
对于第组样例,三组合法的解是
Resources
每周一题 Div1